]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/child.c
Use _PATH_BSHELL to ensure using a bourne shell
[i3/i3] / i3bar / src / child.c
index 4e5e49c928edf37f1e3ff450c0cb5b5c0f87ddaa..dce0218fd305fda1ee38be246a47cc2e3618f249 100644 (file)
@@ -22,6 +22,7 @@
 #include <yajl/yajl_parse.h>
 #include <yajl/yajl_version.h>
 #include <yajl/yajl_gen.h>
+#include <paths.h>
 
 #include "common.h"
 
@@ -423,12 +424,7 @@ void start_child(char *command) {
                 dup2(pipe_in[1], STDOUT_FILENO);
                 dup2(pipe_out[0], STDIN_FILENO);
 
-                static const char *shell = NULL;
-
-                if ((shell = getenv("SHELL")) == NULL)
-                    shell = "/bin/sh";
-
-                execl(shell, shell, "-c", command, (char*) NULL);
+                execl(_PATH_BSHELL, _PATH_BSHELL, "-c", command, (char*) NULL);
                 return;
             default:
                 /* Parent-process. Reroute streams */