Date: Fri, 05 Nov 1999 12:18:21 +0200 From: Sheldon Hearn <sheldonh@uunet.co.za> To: Jos Backus <Jos.Backus@nl.origin-it.com> Cc: Jos Backus <jbackus@plex.nl>, freebsd-hackers@freebsd.org Subject: Re: ftpd feature: lock file being stored Message-ID: <7173.941797101@axl.noc.iafrica.com> In-Reply-To: Your message of "Fri, 05 Nov 1999 11:15:18 %2B0100." <19991105111518.A2328@hal.mpn.cp.philips.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 05 Nov 1999 11:15:18 +0100, Jos Backus wrote: > > So fstat(1) doesn't show you that the file is opened to ftpd? > > No, it does indeed show that. Then use fstat. :-) > It seems a more natural solution to me than grepping for ftpd in fstat's > output regarding the file. I think you've developed a complex solution to a more simply solved problem. UNIX offers you lots of little tools for good reason. Adding functionality to ftpd that is available through other tools doesn't seem wise to me. > Also, I think that approach introduces races when > you have more than one program/script polling the directory. What does "polling the directory" mean? Fstat(1) is interested only in those programs which have open file descriptors on the file you're interested in. Sounds like the perfect tool for the job. :-) Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7173.941797101>