]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.cc
exec a requested new process via /bin/sh to allow for command line args, the same...
[chaz/openbox] / src / openbox.cc
index 89948118f7ff37cc4721a4fb7048ad2a504463bd..d599e7bfc19ba4128b79eb472dd99d72630896ef 100644 (file)
@@ -199,10 +199,8 @@ Openbox::~Openbox()
 
   if (_restart) {
     if (!_restart_prog.empty()) {
-      const std::string &dstr =
-        otk::display->screenInfo(first_screen)->displayString();
-      otk::putenv(const_cast<char *>(dstr.c_str()));
-      execlp(_restart_prog.c_str(), _restart_prog.c_str(), NULL);
+      otk::putenv(otk::display->screenInfo(first_screen)->displayString());
+      execl("/bin/sh", "/bin/sh", "-c", _restart_prog.c_str(), NULL); 
       perror(_restart_prog.c_str());
     }
     
This page took 0.026458 seconds and 4 git commands to generate.