Re: Re: SA-Exim timeout -> use SA 2.1 cvs, not 2.1
Derrick 'dman' Hudson <[email protected]>
| Newsgroups | gmane.mail.exim.spamassassin |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Oct 22, 2002 at 02:23:10AM -0700, Marc MERLIN wrote:
| BTW, if a real C programmer can answer this for me:
| /* Ok, tell me what's the better way of getting the size of the file an fd
| * points to */
You should stat it.
Excerpts from stat(2) :
int fstat(int filedes, struct stat *buf);
These functions return information about the specified file. You do
not need any access rights to the file to get this information but you
need search rights to all directories named in the path leading to the
file.
They all return a stat structure, which contains the following fields:
struct stat {
dev_t st_dev; /* device */
ino_t st_ino; /* inode */
mode_t st_mode; /* protection */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of owner */
gid_t st_gid; /* group ID of owner */
dev_t st_rdev; /* device type (if inode device) */
off_t st_size; /* total size, in bytes */
blksize_t st_blksize; /* blocksize for filesystem I/O */
blkcnt_t st_blocks; /* number of blocks allocated */
time_t st_atime; /* time of last access */
time_t st_mtime; /* time of last modification */
time_t st_ctime; /* time of last change */
};
-D
--
If anyone would come after me, he must deny himself and take up his
cross and follow me. For whoever wants to save his life will lose it,
but whoever loses his life for me and for the gospel will save it. What
good is it for a man to gain the whole world, yet forfeit his soul? Or
what can a man give in exchange for his soul?
Mark 8:34-37
http://dman.ddts.net/~dman/
signature.asc
(application/pgp-signature, 240 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAj21fl8ACgkQO8l8XBKTpRT5mACeM54anLehTD4DlOdIJ8haX79G Oe8AoLCPf/rYqW6Gl11MrCvWl/I1r3vN =S1lg -----END PGP SIGNATURE-----