From owner-svn-src-all@FreeBSD.ORG Thu Mar 27 17:08:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83C3DE2A for ; Thu, 27 Mar 2014 17:08:37 +0000 (UTC) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) (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 54D75AA6 for ; Thu, 27 Mar 2014 17:08:37 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id lf10so3769369pab.13 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=DswHfefuF+kxKnGLKDQS+NHPVDbUQJASyR6c3NpdPfC1ltBak0QT5Kqpj7UynJzGdq ixOkb4QpXeZrelkUoC1DTN8zd6OSGC19Bg1UxoYkN+cdSuwLCyl36ZaLR/3gHekgCM6d 1FO1jUcqmReUIvWNr4NS5JsMjAhzZHzznNcvv+Qb1+wDuqg6i6kZQaGhrhIWh3/EMxp/ zYJJ7ACv+aZx3+qIi8ogYcSenT+g2C6o2rVWJQMsX7hLWHJSrlQrBa8aejmI4Ik9LplZ KuqWu+nyEqNweN66Jjktx3mv74uZ1Q55b8GcU0CgP60SjEgNVSkfSzPvp/Q5yVYUJxBF 96+g== X-Gm-Message-State: ALoCoQnn/ksFKNhxsojh+mwgI53XvQw6UiDKsdgJcjcmiwqQc+4PSMvOo60CMsiWIoLxWxmLH051 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-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 17:08:37 -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