projects
/
oweals
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f8c266
)
close stdin/out/err before forking an instance
author
John Crispin
<blogic@openwrt.org>
Mon, 8 Jul 2013 19:40:14 +0000
(21:40 +0200)
committer
John Crispin
<blogic@openwrt.org>
Mon, 8 Jul 2013 19:40:14 +0000
(21:40 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
instance.c
patch
|
blob
|
history
diff --git
a/instance.c
b/instance.c
index b5ecad07bced86e358f21085e7ecb63f5c3d2923..28e5c94d5611a539ac6dcbb5055bcbecf4fa0a2a 100644
(file)
--- a/
instance.c
+++ b/
instance.c
@@
-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);
}