Re: [dwm] dmenu_run problem

From: Sander van Dijk <a.h.vandijk_AT_gmail.com>
Date: Tue, 12 Feb 2008 09:47:43 +0100

On Feb 12, 2008 9:31 AM, Daniel Bainton <dpb_AT_driftaway.org> wrote:
> Sure, dmenu_path is run with /bin/sh, but the whole "exe=`dmenu_path |
> dmenu $*` && exec $exe" isn't. If you'd look at the source code of
> dwm, you'd see it takes the shell from the SHELL environmental
> variable and runs the line with that.

Au contraire, it is. Take a look at hg tip, you'll see that:
1. config.def.h executes "dmenu_run" (_that_ statement is indeed run
through the shell from the SHELL env var).
2. "dmenu_run" contains a "#!/bin/sh" line, and the whole
"exe=`dmenu_path | dmenu $*` && exec $exe".
3. Hence, the whole "exe=`dmenu_path | dmenu $*` && exec $exe" is run
with "/bin/sh".

Like I said before, the problem the "set" is trying to fix, was
already fixed before by taking the "exe=`dmenu_path | dmenu $*` &&
exec $exe" out of config.h and putting it in a separate script
"dmenu_run" to make sure it is run with a Bourne compatible shell.

Gr. Sander.
Received on Tue Feb 12 2008 - 09:47:49 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:19:06 UTC