Re: [hackers] [dmenu][patch] avoid some forks in shell scripts

From: Glen Mével <glen.mevel_AT_crans.org>
Date: Mon, 11 Nov 2019 15:41:52 +0100

Hello,

Glen Mével wrote (2019-08-10, 23:32):
> Explanation: with common shells (sh, bash, zsh at least), the chain
> command `echo cmd args | $SHELL` leaves an unnecessary shell process,
> waiting for its child process `cmd` to complete. Whereas
> `$SHELL -c "cmd args"` only leaves one process `cmd` in the system.
>
> My guess is that, in the second case, the shell is able to see when
> there is only one command to execute, and in this case it saves a fork
> operation. Whereas in the first case, there might be subsequent
> pending commands to process.
>
> [a patch file was attached]

I received no answer to my patch proposal, positive or negative. Did I
do something wrong?

Regards,

-- 
Glen Mével
Received on Mon Nov 11 2019 - 15:41:52 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 11 2019 - 16:24:27 CET