From owner-svn-src-stable@FreeBSD.ORG Tue Nov 5 19:54:36 2013 Return-Path: Delivered-To: svn-src-stable@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 ESMTP id 850609C7; Tue, 5 Nov 2013 19:54:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 581C7223C; Tue, 5 Nov 2013 19:54:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA5JsaFo015960; Tue, 5 Nov 2013 19:54:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA5JsanP015959; Tue, 5 Nov 2013 19:54:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311051954.rA5JsanP015959@svn.freebsd.org> From: John Baldwin Date: Tue, 5 Nov 2013 19:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r257717 - stable/8/lib/libc/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 19:54:36 -0000 Author: jhb Date: Tue Nov 5 19:54:35 2013 New Revision: 257717 URL: http://svnweb.freebsd.org/changeset/base/257717 Log: MFC 253656: Enhance the description of NOTE_TRACK: - NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid. If NOTE_FORK is set, the listener will get a NOTE_FORK event from the parent pid, but not a separate NOTE_TRACK event. - Explicitly note that the event added to monitor the child process preserves the fflags from the original event. - Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a bit for the user to set (which is what this list pupports to be). Also, explicitly note that if an error occurs, the NOTE_CHILD event will not be generated. Modified: stable/8/lib/libc/sys/kqueue.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/sys/kqueue.2 ============================================================================== --- stable/8/lib/libc/sys/kqueue.2 Tue Nov 5 19:54:13 2013 (r257716) +++ stable/8/lib/libc/sys/kqueue.2 Tue Nov 5 19:54:35 2013 (r257717) @@ -386,20 +386,25 @@ The process has called .It NOTE_EXEC The process has executed a new process via .Xr execve 2 -or similar call. +or a similar call. .It NOTE_TRACK Follow a process across .Fn fork calls. -The parent process will return with NOTE_TRACK set in the +The parent process registers a new kevent to monitor the child process +using the same .Va fflags -field, while the child process will return with NOTE_CHILD set in +as the original event. +The child process will signal an event with NOTE_CHILD set in .Va fflags and the parent PID in .Va data . -.It NOTE_TRACKERR -This flag is returned if the system was unable to attach an event to -the child process, usually due to resource limitations. +.Pp +If the parent process fails to register a new kevent +.Pq usually due to resource limitations , +it will signal an event with NOTE_TRACKERR set in +.Va fflags , +and the child process will not signal a NOTE_CHILD event. .El .Pp On return,