summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index efd42dc..d367ead 100644
--- a/main.cpp
+++ b/main.cpp
@@ -203,6 +203,7 @@ void spawn(const KeyArg arg)
if(fork() == 0)
{
int null = open("/dev/null", O_WRONLY);
+ dup2(null, 0);
dup2(null, 1);
dup2(null, 2);
const std::string argsStr = arg.str;
@@ -497,6 +498,7 @@ void bashSpawn(const KeyArg arg)
if(fork() == 0)
{
int null = open("/dev/null", O_WRONLY);
+ dup2(null, 0);
dup2(null, 1);
dup2(null, 2);
system(arg.str);
@@ -1023,5 +1025,7 @@ int main(int argc, char** argv)
}
}
+ //Kill children
+
XCloseDisplay(dpy);
}