[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking executability for asynchronous commands
From: |
Eli Schwartz |
Subject: |
Re: Checking executability for asynchronous commands |
Date: |
Mon, 28 Dec 2020 17:30:06 -0500 |
On 12/28/20 4:45 PM, Léa Gris wrote:
When you handle such logic within Bash you already lost on a race
condition when foo is readable and executable when you test it, but when
it reaches the actual execution, it is no longer the case.
Bash is full of race conditions, because bash was never meant as a
General Purpose language. Bash is a good command sequencer.
Now if ppl forget to use wait PID after launching a sub-shell background
command, then shame on them.
The race condition doesn't matter if they anyways need to check the
status by waiting on the PID, in order to handle "it executed, but
resulted in failure".
So it's not very tragic if the race condition resulted in users being
unable to see the *enhanced* error message describing the missing
dependency executable condition... this entire thread seems to just be
about error reporting, right?
(Though I have to wonder at these amazing AWOL commands that get
uninstalled on people all the time right in the middle of their scripts.
Maybe if they use a package manager for both the scripts and the
dependency executables, they could fully prevent race conditions *and*
not even need to check if their dependencies are installed.)
--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User
OpenPGP_signature
Description: OpenPGP digital signature
- Re: Checking executability for asynchronous commands, (continued)
- Re: Checking executability for asynchronous commands, Chet Ramey, 2020/12/25
- Re: Checking executability for asynchronous commands, Markus Elfring, 2020/12/26
- 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 <=
- 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, 2020/12/27
- 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