diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/actions.c | 5 |
2 files changed, 9 insertions, 2 deletions
@@ -1,9 +1,13 @@ +2005-01-15 Shawn Betts <sabetts@vcn.bc.ca> + + * src/actions.c (spawn): Prepend cmd with exec. + 2004-01-15 Bernhard R. Link <brlink@debian.org> * actions.c (cmd_focusleft,cmd_focusright,cmd_focusup,cmd_focusdown): show currectframe if movement not possible. -2005-01-15 Shawn Betts <katia_dilkina@verizon.net> +2005-01-15 Shawn Betts <sabetts@vcn.bc.ca> * src/frame.c (frame_read): correctly determine if the input starts with "(frame ". diff --git a/src/actions.c b/src/actions.c index f80d227..d527782 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2372,6 +2372,7 @@ cmd_exec (int interactive, struct cmdarg **args) int spawn(char *cmd) { + char *tmp; rp_child_info *child; int pid; @@ -2389,7 +2390,9 @@ spawn(char *cmd) #elif defined (HAVE_SETPGRP) setpgrp (0, 0); #endif - execl("/bin/sh", "sh", "-c", cmd, 0); + /* Prepend with exec to avoid excess /bin/sh's. */ + tmp = xsprintf ("exec %s", cmd); + execl("/bin/sh", "sh", "-c", tmp, 0); _exit(EXIT_FAILURE); } |