diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-06-28 08:56:07 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-06-28 08:56:07 +0000 |
commit | 0ba9411d4fa6e17ef377ea7602dd35166229e8f7 (patch) | |
tree | 43185da1c47eaf43fdb90d6e1a06d46724b31b42 /daemon.c | |
parent | a810b6eba0f223a1ab5c2c279e8745f73496bf1b (diff) | |
download | fetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.tar.gz fetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.tar.bz2 fetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.zip |
Better file check for progress-to control.
svn path=/trunk/; revision=2909
Diffstat (limited to 'daemon.c')
-rw-r--r-- | daemon.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -205,4 +205,16 @@ nottyDetach: return(0); } +flag isafile(int fd) +/* is the given fd attached to a file? (used to control logging) */ +{ + struct stat stbuf; + + if (fstat(fd, &stbuf)) + return(0); + else if (stbuf.st_mode & (S_IFREG | S_IFBLK)) + return(1); + return(0); +} + /* daemon.c ends here */ |