bug-bash
[Top][All Lists]
Advanced

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

Re: wait -n misses signaled subprocess


From: Robert Elz
Subject: Re: wait -n misses signaled subprocess
Date: Mon, 29 Jan 2024 20:52:37 +0700

    Date:        Mon, 29 Jan 2024 13:54:10 +0100
    From:        Andreas Schwab <schwab@suse.de>
    Message-ID:  <mvmjzns9u6l.fsf@suse.de>

  | n = next?

That would be a reasonable interpretation, I guess, but
unfortunately not one which helps the current question,
as it doesn't answer "next what?"   It could be "the next
of these processes which terminates" (like the "new"
interpretation) or "the next of these processes that has
a status available" (like the "any" interpretation).

While I'm here, I will also mention that the bash man page
section for wait(1) does say "any" in one place, and equivalent
(but better) wording in another ("a single job"), but never
mentions "new" anywhere.

Further in both the -n and no -n cases, the wait utility is
stated to "wait for" (whatever is appropriate for the args given)
hence the operation should be assumed to be the same in both
cases, either an actual pause is required in both (until some
appropriate process changes status) or is not required in either
(if such a process has already terminated and is waiting for
shell level reaping).

Note that processes that have already been reported (via wait,
or jobs, or the prompt level jobs lookalike) have already been
reported, so if any of that had happened wait isn't expected to
be able to fetch status from them again.

kre



reply via email to

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