From owner-freebsd-current@FreeBSD.ORG Tue Jun 24 23:04:25 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FD5237B401; Tue, 24 Jun 2003 23:04:25 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6968743FEC; Tue, 24 Jun 2003 23:04:24 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h5P65IMo020302; Wed, 25 Jun 2003 02:05:18 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h5P64owH020102; Tue, 24 Jun 2003 23:04:50 -0700 (PDT) (envelope-from jmg) Date: Tue, 24 Jun 2003 23:04:50 -0700 From: John-Mark Gurney To: Juli Mallett Message-ID: <20030625060450.GX57612@funkthat.com> Mail-Followup-To: Juli Mallett , "Tim J. Robbins" , freebsd-current@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030625001525.A60867@FreeBSD.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: freebsd-current@freebsd.org cc: "Tim J. Robbins" Subject: Re: tcsh being dodgy, or pipe code ishoos? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jun 2003 06:04:25 -0000 Juli Mallett wrote this message on Wed, Jun 25, 2003 at 00:15 -0500: > * Juli Mallett [ Date: 2003-06-24 ] > [ w.r.t. Re: tcsh being dodgy, or pipe code ishoos? ] > > * Tim Kientzle [ 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."