[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking executability for asynchronous commands
From: |
Andreas Kusalananda Kähäri |
Subject: |
Re: Checking executability for asynchronous commands |
Date: |
Fri, 25 Dec 2020 16:20:14 +0100 |
On Fri, Dec 25, 2020 at 10:40:17AM +0100, Markus Elfring wrote:
> Hello,
>
> I am looking for another bit of clarification according to an implementation
> detail.
>
> The manual is providing the following information.
> https://git.savannah.gnu.org/cgit/bash.git/tree/doc/bash.1?id=76404c85d492c001f59f2644074333ffb7608532#n627
>
> “…
> If a command is terminated by the control operator &, the shell
> executes the command in the background in a subshell. The shell does not
> wait for the command to finish, and the
> return status is 0.
> …”
>
>
> Thus I observe a behaviour like the following for a simple test with the
> software “bash 5.0.18-3.1” according to a “program” which does not exist here.
>
> elfring@Sonne:~> xy &
> [1] 4063
> xy: Befehl nicht gefunden
> [1]+ Exit 127 xy
>
>
> I imagine that it can be occasionally helpful to determine the execution
> failure
> in the synchronous way.
> Would it make sense to configure the error reporting for selected asynchronous
> commands so that they would become background processes only after the
> required
> check for executability?
How would you propose that the shell handle something like the following?
( cmd1 && cmd2 ) &
Are you maybe saying
cmd &
should be a special case?
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.
- Checking executability for asynchronous commands, Markus Elfring, 2020/12/25
- Re: Checking executability for asynchronous commands,
Andreas Kusalananda Kähäri <=
- 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