Subject: Re: Possible solution to toolchain/16963 - NBUILDJOBS/METALOG conflict
To: None <tech-userlevel@netbsd.org>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: tech-userlevel
Date: 06/06/2002 18:10:17
--x3ENEa1yd42KAyDQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Thu, Jun 06, 2002 at 04:33:08PM -0400, Mason Loring Bliss wrote:
> On Thu, Jun 06, 2002 at 12:17:18PM +0100, Ben Harris wrote:
>=20
> Come to that, how about something like:
> >=20
> > main(int argc, char **argv)
> > {
> >=20
> > flock(STDOUT_FILENO, LOCK_EX);
> > if (!fork())
> > execvp("cat", argv);
> > wait();
> > flock(STDOUT_FILENO, LOCK_UN);
> > return 0;
> > }
>=20
> If locking stdout does what you're suggesting, I guess that would be
> completely sufficient.
I find after a bit of testing that it does precisely the right thing.
Since this works, locking stdout would seem to be a useful option for
cat(1), perhaps.
--=20
Mason Loring Bliss mason@acheron.middleboro.ma.us Ewige Blumenkraft!
https://www.deadsexy.org/ awake ? sleep : random() & 2 ? dream : sleep;
--x3ENEa1yd42KAyDQ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE8/93IykMMY715wXIRAgYiAKDQcrnwafbqKDabvL1sQ18tCeodYwCg1BL/
diRdA7LFWEVFCvXxTEZE8jg=
=qvTd
-----END PGP SIGNATURE-----
--x3ENEa1yd42KAyDQ--