From 728022e170bf7f0ccc20101cc53587dfcd853ee5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 21 Jul 2002 10:13:04 +0000 Subject: [PATCH] exec stuff with "exec " so the sh isnt left over in memory for each process --- util/epist/screen.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.45.2