From: John Crispin Date: Mon, 8 Jul 2013 19:40:14 +0000 (+0200) Subject: close stdin/out/err before forking an instance X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fprocd.git;a=commitdiff_plain;h=8643c5876241474be551980e51740f2dcb8046bd close stdin/out/err before forking an instance Signed-off-by: John Crispin --- diff --git a/instance.c b/instance.c index b5ecad0..28e5c94 100644 --- 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); }