Re: [dev] dmenu and dwm: is exec really needed

From: Mattias Andrée <maandree_AT_kth.se>
Date: Fri, 29 Apr 2016 00:21:48 +0200

On Thu, 28 Apr 2016 18:01:46 -0400
Greg Reagle <greg.reagle_AT_umbc.edu> wrote:

> I use dwm. Sometimes I use Mod-p to start a GUI program
> like firefox. I looked at the output of ps xf and noticed
> that my shell is sticking around:
> 21347 ? S 0:00 /usr/bin/fish
> 21388 ? Rl 0:04 \_ iceweasel
>
> I can type `exec firefox` instead of `firefox` to avoid
> this, but should I have to? Am I doing something wrong
> or is dwm supposed to work this way?
>
> Thank you.
>

dmenu lets you any shell expression, it means that you
cannot always just add exec to the beginning. For example,

  for i in $(seq 10); do blah blah blah; done

cannot be rewritten as

  exec for i in $(seq 10); do blah blah blah; done

This is _not_ limited to when the first word is a
reserved word. Figuring out when you can add exec
is not possible outside the shell itself. Therefore
I think the best solution would be if shell's had
-o exec-when-possible, that dmenu could start the
shell with. This there something like this? This
would be useful for system(3) too.

Received on Fri Apr 29 2016 - 00:21:48 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 29 2016 - 00:24:17 CEST