Subject: Re: This should be the final cat(1) patch...
To: Ben Harris , Alan Barrett <email@example.com>
From: Mason Loring Bliss <firstname.lastname@example.org>
Date: 06/08/2002 13:41:45
Content-Type: text/plain; charset=us-ascii
On Sat, Jun 08, 2002 at 04:24:25PM +0100, Ben Harris wrote:
> >From /usr/share/misc/style:
> * Use err/warn(3), don't roll your own!
I'm researching this right now, trying to understand where and how err(3)
and warn(3) are actually defined on a system with no err.h... Given that
part of this exercise is to produce a new host tool for inclusion in
TOOLDIR, using non-standard function calls seems uncool. (This is, for
instance, why I'm using fcntl(2) instead of the much simpler flock(2).)
On Sat, Jun 08, 2002 at 11:25:56AM +0200, Alan Barrett wrote:
> Please add fcntl(2) to the SEE ALSO section of the man page,
> and add more detail to the description of the -l option,
> something like this:
Okay, all reasonable. I will do so in a couple minutes.
On Sat, Jun 08, 2002 at 11:38:00AM +0200, Alan Barrett wrote:
> It's probably not a good idea to lock the file before all the options
> have been parsed.
Okay, I will defer locking. Not doing work in the middle of getopt(3) will
seem cleaner in any event.
> While we are adding flags to cat, how about "-a" flag to do
> fcntl(STDOUT_FILENO, O_APPEND) ?
There's no equivalent functionality to the -l flag currently. However, how
would -a differ from "cat >> foo"?
On Sat, Jun 08, 2002 at 04:20:48PM +0100, Ben Harris wrote:
> Erm, if you change that, you should probably also change install(1) to use
> fcntl() as well. I'm not sure how nicely they play together.
They mix quite well. It's still an exclusive advisory lock - they don't
differ qualitatively. But, still, Luke is in fact moving install(1) over
to using fcntl(2) instead of flock(2). I don't know if it's been committed
Mason Loring Bliss email@example.com Ewige Blumenkraft!
https://www.deadsexy.org/ awake ? sleep : random() & 2 ? dream : sleep;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----