bug-bash
[Top][All Lists]
Advanced

[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: Sun, 27 Dec 2020 08:02:49 -0500

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?

Would you care if configuring bash to wait on identification of background processes will occasionally be forgotten?

Would you care if checking the status of foreground processes and doing different things based on success or failure will occasionally be forgotten?

Would you care if <insert important part of script> will occasionally be forgotten?


I'm not sure I understand the question? Writing programs in *any* programming language requires attention to detail and effectively conveying your need to the programming language. bash is no exception, even if people have a terrible habit of treating bash like it should be special or different merely because it uses subprocesses a lot, and is popular.

A stronger argument must be made for new features rather than merely "sometimes people are extremely forgetful, we need a new language feature that doesn't fit in well and doesn't behave consistently, so they can be forgetful about that instead".

--
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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