diff --git a/svc.c b/svc.c index d157ed57..e615b464 100644 --- a/svc.c +++ b/svc.c @@ -677,8 +677,11 @@ int svc_start(svc_t *svc) status = execv(svc->cmd, args); /* XXX: Maybe use execve() to be able to launch scripts? */ if (SVC_CMD_INETD == svc->type) { - if (svc->inetd.type == SOCK_STREAM) - close(sd); + if (svc->inetd.type == SOCK_STREAM) { + close(STDIN_FILENO); + close(STDOUT_FILENO); + close(STDERR_FILENO); + } } exit(status);