exec stuff with "exec " so the sh isnt left over in memory for each process
This commit is contained in:
parent
df7120d5ff
commit
728022e170
1 changed files with 2 additions and 1 deletions
|
@ -408,10 +408,11 @@ void screen::execCommand(const std::string &cmd) const {
|
||||||
if ((pid = fork()) == 0) {
|
if ((pid = fork()) == 0) {
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
string c = "exec " + cmd;
|
||||||
char *const argv[] = {
|
char *const argv[] = {
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
const_cast<char *>(cmd.c_str()),
|
const_cast<char *>(c.c_str()),
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
// make the command run on the correct screen
|
// make the command run on the correct screen
|
||||||
|
|
Loading…
Reference in a new issue