[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multi-threaded compiling
From: |
Greg Wooledge |
Subject: |
Re: multi-threaded compiling |
Date: |
Tue, 12 Mar 2024 07:18:28 -0400 |
On Tue, Mar 12, 2024 at 10:33:36AM +0100, Mischa Baars wrote:
> bash -c 'set +m; seconds=1; for (( i=0;i<32;i++ )); do exit ${i} & done;
> sleep ${seconds}; for (( i=0;i<32;i++ )); do wait -p pid; e=${?}; echo
> "$(printf %3u ${i}) pid ${pid} exit ${e}"; done;'
"wait -p pid" is not correct here. In that command, pid is an output
variable, and you have not specified any process IDs to wait for -- so
wait is going to wait for *all* of the children to finish, and you'll
get zero as the exit status:
$ help wait
[...]
Waits for each process identified by an ID, which may be a process ID or a
job specification, and reports its termination status. If ID is not
given, waits for all currently active child processes, and the return
status is zero. If ID is a job specification, waits for all processes
in that job's pipeline.
- Re: multi-threaded compiling, (continued)
- Re: multi-threaded compiling, Robert Elz, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling, Robert Elz, 2024/03/12
- Re: multi-threaded compiling, Greg Wooledge, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling, Chet Ramey, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling, Martin D Kealey, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/13
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling,
Greg Wooledge <=
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/12
- Re: multi-threaded compiling, Mischa Baars, 2024/03/11
- Re: multi-threaded compiling, alex xmb sw ratchev, 2024/03/11
- Re: multi-threaded compiling, alex xmb sw ratchev, 2024/03/11
- Re: multi-threaded compiling, Mischa Baars, 2024/03/11
- Re: multi-threaded compiling, alex xmb sw ratchev, 2024/03/11
- Re: multi-threaded compiling, Greg Wooledge, 2024/03/11
- Re: multi-threaded compiling, Paul Smith, 2024/03/11
- Re: multi-threaded compiling, Mischa Baars, 2024/03/11