bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'wait -n' with and without id arguments


From: Robert Elz
Subject: Re: 'wait -n' with and without id arguments
Date: Wed, 25 Sep 2024 23:50:25 +0700

    Date:        Wed, 25 Sep 2024 11:06:10 -0400
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <f0e22f19-f683-47a9-9c08-184e4a08b4a6@case.edu>

  | So you are saying that prompt notifications and `jobs' have the same
  | effect. POSIX implies but does not require this, and there is differing
  | behavior among current implementatations.

What it does say in XCU 2.9.3.1 (Issue 8) is:

� If the shell is interactive and the asynchronous AND-OR list became
  a background job: a message indicating completion of the corresponding
  job is written to standard error. If set -b is enabled, it is unspecified
  whether the process ID is removed from the list of known process IDs when
  the message is written or immediately prior to when the shell writes the
  next prompt for input.

which certainly implies (at the least) to me that the job needs to be
deleted by the time the next prompt is issued, either as a result of
set -b notification (if that is enabled) or by the changed status
notification that precedes each prompt (and that it is one of those
two which does it.)

Apart from the jobs & wait utilities (and XCU 2.11 which is what requires
writing the message mentioned in 2.9.3.1, but doesn't say anything
about removing jobs from the jobs table - except in the case of
converting a bg job to fg which isn't relevant here) from a quick
look I can't see anywhere else where anything is either required to
be, or even permitted to be, deleted (too many child processes, and
such excepted).

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]