[Bug 196951] Feature request: fix wait-built to allow waiting for ANY process, not just the current shell's child

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jan 21 00:21:37 UTC 2015


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 at FreeBSD.org
          Reporter: mi at 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.


More information about the freebsd-bugs mailing list