]> Dogcows Code - chaz/openbox/commitdiff
exec a requested new process via /bin/sh to allow for command line args, the same...
authorDana Jansens <danakj@orodu.net>
Thu, 16 Jan 2003 23:05:58 +0000 (23:05 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 16 Jan 2003 23:05:58 +0000 (23:05 +0000)
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.021333 seconds and 4 git commands to generate.