Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2015 00:21:37 +0000
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
Message-ID:  <bug-196951-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-196951-8>