From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 21 00:21:37 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85C75DF8 for ; Wed, 21 Jan 2015 00:21:37 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C20537D for ; Wed, 21 Jan 2015 00:21:37 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L0Lb9e044009 for ; Wed, 21 Jan 2015 00:21:37 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196951] Feature request: fix wait-built to allow waiting for ANY process, not just the current shell's child Date: Wed, 21 Jan 2015 00:21:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mi@ALDAN.algebra.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:21:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196951 Bug ID: 196951 Summary: Feature request: fix wait-built to allow waiting for ANY process, not just the current shell's child Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: mi@ALDAN.algebra.com Historical implementation of the wait-builtin of both sh and csh relied on wait(2) (and/or friends), which only affords wait-ing for the current shell's children. However, for some time BSD's kevent(2)'s EVFILT_PROC has allowed monitoring any visible process for the NOTE_EXIT -- a feature used by pwait(1) already. I'd like the wait-builtin of our current base shells to be rewritten to make use of the feature -- providing the same functionality the traditional implementation offered (exit status), but allowing to watch a wider variety of processes. One immediate application of this will allow service-scripts (such as those inside /etc/rc.d) to properly wait for the service stop before exiting or starting it again. I'd be happy to offer the necessary patches, but wish to secure the acquiescence in principle first. -- You are receiving this mail because: You are the assignee for the bug.