diff options
author | Werner Fink <werner@suse.de> | 2012-03-13 16:15:43 +0100 |
---|---|---|
committer | Werner Fink <werner@suse.de> | 2012-03-13 16:15:43 +0100 |
commit | 378eea8bd5db4ed8244ce1a3f416137f131acdd5 (patch) | |
tree | ac5efd347d52b9be448ce2b593b92327c3b24501 /src | |
parent | 54033e94bb8e038655f3241524da5616cb344435 (diff) |
Use --enable-timeout-stat as well as --enable-timeout-stat=static
for a static background process which does the final stat system calls
Signed-off-by: Werner Fink <werner@suse.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/fuser.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index d511f24..a28af7d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,9 @@ if WANT_PEEKFD_MIPS endif fuser_SOURCES = fuser.c comm.h signals.c signals.h i18n.h fuser.h lists.h +if WANT_TIMEOUT_STAT + fuser_SOURCES += timeout.c timeout.h +endif fuser_LDADD = @LIBINTL@ diff --git a/src/fuser.c b/src/fuser.c index e4081eb..09548ff 100644 --- a/src/fuser.c +++ b/src/fuser.c @@ -111,9 +111,13 @@ static dev_t device(const char *path); #endif static char *expandpath(const char *path); -typedef int (*stat_t)(const char*, struct stat*); #ifdef WITH_TIMEOUT_STAT +# if (WITH_TIMEOUT_STAT == 2) +# include "timeout.h" +# else +typedef int (*stat_t)(const char*, struct stat*); static int timeout(stat_t func, const char *path, struct stat *buf, unsigned int seconds); +# endif #else #define timeout(func,path,buf,dummy) (func)((path),(buf)) #endif /* WITH_TIMEOUT_STAT */ @@ -1783,7 +1787,7 @@ scan_swaps(struct names *names_head, struct inode_list *ino_head, * Execute stat(2) system call with timeout to avoid deadlock * on network based file systems. */ -#ifdef HAVE_TIMEOUT_STAT +#if defined(WITH_TIMEOUT_STAT) && (WITH_TIMEOUT_STAT == 1) static sigjmp_buf jenv; |