bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking executability for asynchronous commands


From: Markus Elfring
Subject: Checking executability for asynchronous commands
Date: Fri, 25 Dec 2020 10:40:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

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?

Regards,
Markus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]