From 8643c5876241474be551980e51740f2dcb8046bd Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 8 Jul 2013 21:40:14 +0200 Subject: [PATCH] close stdin/out/err before forking an instance Signed-off-by: John Crispin --- instance.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.11.0