Date: Tue, 24 Jun 2003 23:04:50 -0700 From: John-Mark Gurney <gurney_j@efn.org> To: Juli Mallett <jmallett@freebsd.org> Cc: "Tim J. Robbins" <tjr@freebsd.org> Subject: Re: tcsh being dodgy, or pipe code ishoos? Message-ID: <20030625060450.GX57612@funkthat.com> In-Reply-To: <20030625001525.A60867@FreeBSD.org> References: <20030624183515.A42570@FreeBSD.org> <1056499632.662.7.camel@timon.nist> <3EF922BE.4070803@acm.org> <20030624234707.A59666@FreeBSD.org> <20030625001525.A60867@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Juli Mallett wrote this message on Wed, Jun 25, 2003 at 00:15 -0500:
> * Juli Mallett <jmallett@FreeBSD.org> [ Date: 2003-06-24 ]
> [ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ]
> > * Tim Kientzle <kientzle@acm.org> [ Date: 2003-06-24 ]
> > > Hmmm... This looks like xargs isn't waiting for the subcommand
> > > to exit. This looks like 'echo -- + 2' and 'echo -- + 3' are
> > > running concurrently.
> >
> > How about this, it essentially says that in the not -P case, no procs
> > may be unwaited-on, whereas otherwise we say that 1 may be unwaited-on..
>
> jmg@ points out this better idea, of doing the waitchildren before the
> vfork, allowing xargs to do its work while the child runs, as seems to
> be the desirable effect of having maxprocs=1, so.
Ok, I seem to have found out that we are reaping a child that we don't
know about. slightly modified xargs produces this:
> ( ( echo 2 ; echo 3 ) | ktrace -id -f /tmp/xargs.ktrace ./xargs -I% echo + % )
waiting: waitall: 0, curprocs: 0, maxprocs: 1
reaping: pid: 1073, self: 1072, status: 0
starting
started: 1074
+waiting: waitall: 0, curprocs: 0, maxprocs: 1
2starting
started: 1075
+ waiting: waitall: 1, curprocs: 1, maxprocs: 1
3
reaping: pid: 1074, self: 1072, status: 0
reaping: pid: 1075, self: 1072, status: 0
Examining the output shows no restiges of pid 1073.
--
John-Mark Gurney Voice: +1 415 225 5579
"All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030625060450.GX57612>
