[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking executability for asynchronous commands
From: |
Chet Ramey |
Subject: |
Re: Checking executability for asynchronous commands |
Date: |
Sun, 27 Dec 2020 11:52:55 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 12/27/20 5:01 AM, Markus Elfring wrote:
If you have the pid of an asynchronous command -- and the easiest way to get
that pid
is by referencing $! after it was started -- you can call `wait' with that pid
to retrieve the status, even if it's already terminated.
Would you care if waiting on such identifications for background processes
will occasionally be forgotten?
How many efforts would you invest to add potentially missing wait function
calls?
It's axiomatic: if you want to make a decision based on the exit status of
any asynchronous process, you need to use `wait' to obtain the status of
that process.
I don't think "I don't want to do it that way" is a good reason to provide
a different method.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
- Re: Checking executability for asynchronous commands, (continued)
- Re: Checking executability for asynchronous commands, Chet Ramey, 2020/12/26
- Re: Checking executability for asynchronous commands, Markus Elfring, 2020/12/27
- Re: Checking executability for asynchronous commands, Eli Schwartz, 2020/12/27
- Re: Checking executability for asynchronous commands, Greg Wooledge, 2020/12/28
- Re: Checking executability for asynchronous commands, Ilkka Virta, 2020/12/28
- Re: Checking executability for asynchronous commands, Eli Schwartz, 2020/12/28
- Re: Checking executability for asynchronous commands, Léa Gris, 2020/12/28
- Re: Checking executability for asynchronous commands, Eli Schwartz, 2020/12/28
- Re: Checking executability for asynchronous commands, Chet Ramey, 2020/12/29
- Re: Checking executability for asynchronous commands, Eli Schwartz, 2020/12/29
- Re: Checking executability for asynchronous commands,
Chet Ramey <=
- Re: Checking executability for asynchronous commands, Markus Elfring, 2020/12/28
- Re: Checking executability for asynchronous commands, Chet Ramey, 2020/12/29
- Re: Checking executability for asynchronous commands, Robert Elz, 2020/12/29
Re: Checking executability for asynchronous commands, Dale R. Worley, 2020/12/28
Re: Checking executability for asynchronous commands, Markus Elfring, 2020/12/29