diff options
author | John Crispin <blogic@openwrt.org> | 2013-07-08 21:40:14 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-07-08 21:40:14 +0200 |
commit | 8643c5876241474be551980e51740f2dcb8046bd (patch) | |
tree | e02e6cbf365a3fa64396e3d39c3679aed21dd109 | |
parent | 9f8c266ba9a7232710b492974750cdbf0edf0bfe (diff) | |
download | unitd-8643c5876241474be551980e51740f2dcb8046bd.tar unitd-8643c5876241474be551980e51740f2dcb8046bd.zip |
close stdin/out/err before forking an instance
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r-- | instance.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -81,6 +81,9 @@ instance_run(struct service_instance *in) argv[argc++] = blobmsg_data(cur); argv[argc] = NULL; + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); execvp(argv[0], argv); exit(127); } |