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

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Mon, 11 Nov 2019 18:32:36 +0100

On Mon, Nov 11, 2019 at 03:41:52PM +0100, Glen Mvel wrote:
> Hello,
>
> Glen Mvel 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 Mvel
>

Hi,

It was discussed before a few times.

Subject:
[hackers] [dmenu][PATCH] Replace dmenu_run shell with executed application

Around december last year.

-- 
Kind regards,
Hiltjo
Received on Mon Nov 11 2019 - 18:32:36 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 11 2019 - 18:36:25 CET