From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 07:10:49 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 F1609106564A for ; Mon, 31 Mar 2008 07:10:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 95F7C8FC1B for ; Mon, 31 Mar 2008 07:10:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from knop-beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Mar 2008 09:10:46 +0200 Date: Mon, 31 Mar 2008 09:11:28 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@knop-beagle.kn.op.dlr.de To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86ve33wo1e.fsf@ds4.des.no> Message-ID: <20080331090902.P89672@knop-beagle.kn.op.dlr.de> References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <86ve33wo1e.fsf@ds4.des.no> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 31 Mar 2008 07:10:46.0921 (UTC) FILETIME=[579B6790:01C892FE] Cc: Mel , 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 Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2008 07:10:50 -0000 On Mon, 31 Mar 2008, Dag-Erling Smrgrav wrote: DS>Mel writes: DS> DS>> EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, DS>> 0, 0); DS>> EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0, DS>> 0, 0); DS> DS>This is never going to work. DS> DS>First, the second kevent overrides the first, because they both have the DS>same ident. Why is that so? The man page states that the kevent is identified by the (ident, filter) pair. This would also make more sense, because with bi-directional descriptors (sockets or so) you might want to 'select' on read and write. harti