From owner-svn-src-head@FreeBSD.ORG Thu Mar 27 17:08:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD916F4D for ; Thu, 27 Mar 2014 17:08:42 +0000 (UTC) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EFBFAA9 for ; Thu, 27 Mar 2014 17:08:42 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id y10so3629603pdj.36 for ; Thu, 27 Mar 2014 10:08:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=c8CLuA2tXjO9SW9UEPplJ5YWSZ++boTWJSl2XAba3Fw=; b=VBSQWQo+I5YPOwJc28yF/BvbYt/kb2t75eRBVT2Va/E4QIOOa2NDtXHGdhLfgXGGZ5 xXrgSm+DyYZiYDNR2whhL7XapmfYD2B3b7qKJHFAHmBnPtMs1aal80+UVbtSQlJXJ0GO fXyFNJNQbXWCiIbjWLjK4ht+8VUBpr0uYNroX9NsQnD1AAe2Y0OWTK580r881rFj2BnR 0eyuNEKvtHinbQzG4jwGSPQcT/ga41mPvoFt+LHT48p9QNGnuCgfrqOsL0jbQY8S7YR0 fHpxkj4e4MvDcSvcMISD8z9rHCA54D6RXdULgG31RTIzAOF5BwEuh5K6Q/yb1Z/vejwm s+Dw== X-Gm-Message-State: ALoCoQkcgOqbm/VptQEos/QMXesurBbHlIuoig8FIVgB3qBtmeuOiaCKKrfqiAS6cvpxganAUu+w X-Received: by 10.66.164.229 with SMTP id yt5mr3017101pab.67.1395940116627; Thu, 27 Mar 2014 10:08:36 -0700 (PDT) Received: from [10.64.26.19] (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id oa3sm11406402pbb.15.2014.03.27.10.08.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 10:08:36 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: svn commit: r263755 - head/sys/kern From: Warner Losh In-Reply-To: <20140327083730.GA22942@dft-labs.eu> Date: Thu, 27 Mar 2014 11:08:34 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <54C6CC48-3B3B-412C-8C74-1A0A32534CC4@gmail.com> References: <201403252330.s2PNUaei052956@svn.freebsd.org> <5333D70D.7050306@freebsd.org> <20140327083730.GA22942@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.1874) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Xu , Mateusz Guzik X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 17:08:42 -0000 On Mar 27, 2014, at 2:37 AM, Mateusz Guzik wrote: > On Thu, Mar 27, 2014 at 03:45:17PM +0800, David Xu wrote: >> I think the async process pointer can be cleared when a process exits >> by registering an event handler. please see attached patch. >>=20 >=20 > Sure, but I'm not very fond of this solution. >=20 > This is a rather obscure bug you wont hit unless you explicitly try, > and even then you need root privs by default. >=20 > As such writing a callback function which will be executed for all = exiting > processes seems unjustified for me. >=20 > Ideally we would get some mechanism which would allow to register > callbacks for events related to given entity. Then it could be used to > provide a "call this function when process p exits", amongst other = things. I=92m wondering why the FD isn=92t getting closed and the close() = routine being called which should clear this pointer. Since we can only ever have one opener, = we know the close will always be called. What am I missing? Seems like an invented non-issue. Warner