]> Dogcows Code - chaz/openbox/commitdiff
exec stuff with "exec " so the sh isnt left over in memory for each process
authorDana Jansens <danakj@orodu.net>
Sun, 21 Jul 2002 10:13:04 +0000 (10:13 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 21 Jul 2002 10:13:04 +0000 (10:13 +0000)
util/epist/screen.cc

index 78f3a9d0805b5c2a21707685075ce8552cc3b0cb..8f9fbe3c02605483caf76fa5399c93b006c9bec3 100644 (file)
@@ -408,10 +408,11 @@ void screen::execCommand(const std::string &cmd) const {
   if ((pid = fork()) == 0) {
     extern char **environ;
 
+    string c = "exec " + cmd;
     char *const argv[] = {
       "sh",
       "-c",
-      const_cast<char *>(cmd.c_str()),
+      const_cast<char *>(c.c_str()),
       0
     };
     // make the command run on the correct screen
This page took 0.02763 seconds and 4 git commands to generate.