[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'wait -n' with and without id arguments
From: |
Zachary Santer |
Subject: |
Re: 'wait -n' with and without id arguments |
Date: |
Fri, 16 Aug 2024 08:21:18 -0400 |
On Wed, Aug 14, 2024 at 11:22 PM Zachary Santer <zsanter@gmail.com> wrote:
>
> The implicit 'jobs' isn't happening before each PS1, but after each
> command completes. Thus, all the
> > [1] Done random_sleep
> notifications when sourcing wait-n-failure, before it prints
> > 3 processes waited / 8 processes forked
> > 1 seconds
> and exits.
>
> So, actually only doing the implicit 'jobs' work and moving things
> from the jobs table to the list of saved pids and statuses before each
> PS1 *would* be a solution here. When sourcing wait-n-failure, it's
> going to do all its work before any PS1 prompt. Same deal if a user
> wants to call a function with 'wait -n' in it from the command line,
> invoke the edit-and-execute-command readline command, or just type a
> bunch of different commands separated by semicolons into a single
> command line.
This breaks down with 'set -b'/'set -o notify'. Short of 'wait -n'
printing a warning message or erroring out when it is invoked while
'set -b' is active, this isn't a complete solution.
I really think the solution here is for 'wait -n' to return the
termination status of a child process that has already terminated and
that the user has already been informed of. Ultimately, whatever set
of commands is being invoked together and the user who is being
informed of terminated child processes are two different things.
Informing the user does nothing for the set of commands.
- Re: 'wait -n' with and without id arguments, (continued)
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/12
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/12
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/14
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/15
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/12
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/12
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/14
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/14
- Re: 'wait -n' with and without id arguments,
Zachary Santer <=
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/26
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/26
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/30
- Message not available
- Re: 'wait -n' with and without id arguments, Robert Elz, 2024/08/14
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Message not available
- Re: 'wait -n' with and without id arguments, Robert Elz, 2024/08/21
Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/09