From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 21:00:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96AF41065670 for ; Tue, 1 Apr 2008 21:00:17 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 63E168FC13 for ; Tue, 1 Apr 2008 21:00:17 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 4BDCF1CC91; Tue, 1 Apr 2008 13:00:16 -0800 (AKDT) From: Mel To: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= Date: Tue, 1 Apr 2008 23:00:10 +0200 User-Agent: KMail/1.9.7 References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <200803312145.39372.fbsd.hackers@rachie.is-a-geek.net> <868wzx287j.fsf@ds4.des.no> In-Reply-To: <868wzx287j.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200804012300.13313.fbsd.hackers@rachie.is-a-geek.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 21:00:17 -0000 On Tuesday 01 April 2008 12:14:08 Dag-Erling Sm=C3=B8rgrav wrote: > Mel writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > > it will either read input or it won't, and what happens when it > > > reads depends entirely on what the fd it reads from is connected to, > > > whether it's a slow or fast device, blocking or non-blocking, etc. > > > > The kernel knows that the fd at the end of the pipe is blocked for > > reading. > > I'm not sure what you mean by that; do you mean that it's sleeping in > read() or similar? What if it uses select(), poll() or kqueue() > instead? I was hoping the fd had some property "I'm blocked for reading". > > Does it also know it's the end of a pipe and what's on the other end? > > Cause it would be a cool filter to have, if you could detect a blocked > > child as a parent. It sure is better then arbitrary timeouts (this code > > will run 'make install' as a daemon(3) and write 'yes' on those nasty > > post-install questions in ports). > > Many ports will simply use the default configuration instead of asking > if you build them with -DBATCH. Yeah, but that part is in the foreground, cause I don't want default values= , I=20 want to be able to configure the ports and it's dependencies and then build= =20 everything in the background (make config-recursive is flawed by design,=20 that's why I started building this). Looks like BATCH is a good idea though. Thanks for making me look at that=20 again! =2D-=20 Mel