From: Dana Jansens Date: Sun, 21 Jul 2002 10:13:04 +0000 (+0000) Subject: exec stuff with "exec " so the sh isnt left over in memory for each process X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=728022e170bf7f0ccc20101cc53587dfcd853ee5;p=chaz%2Fopenbox exec stuff with "exec " so the sh isnt left over in memory for each process --- diff --git a/util/epist/screen.cc b/util/epist/screen.cc index 78f3a9d0..8f9fbe3c 100644 --- a/util/epist/screen.cc +++ b/util/epist/screen.cc @@ -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(cmd.c_str()), + const_cast(c.c_str()), 0 }; // make the command run on the correct screen