This is a discussion on Re: What's up with our stdout? - FreeBSD ; Andrew Reilly wrote this message on Sun, Jun 25, 2006 at 11:17 +1000: > One interesting problem that I found yesterday was that NetBSD > have added a "-l" option to cat, which is supposed to apply an > exclusive ...
Andrew Reilly wrote this message on Sun, Jun 25, 2006 at 11:17 +1000:
> One interesting problem that I found yesterday was that NetBSD
> have added a "-l" option to cat, which is supposed to apply an
> exclusive advisory lock with fcntl to the the output file, and
> wait until that succeeds:
> http://netbsd.gw.com/cgi-bin/man-cgi...NetBSD-current
> That seems like a pretty useful idea,
> because it means that you can have parallel make jobs all
> contributing to a log file or the like (with cat -l >> foo.log),
> without getting in eachothers' way.
Why not use:
lockf -k foo.log cat >> foo.log
Should do the same thing...
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"