X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/secnet/blobdiff_plain/c6f79b178fe27ee315055dccb371b63ca1a6183a..8dea8d37a13fcc615daba3375809900f04a2e5a2:/secnet.c diff --git a/secnet.c b/secnet.c index 489e0bf..57b4f05 100644 --- a/secnet.c +++ b/secnet.c @@ -342,6 +342,10 @@ static void droppriv(void) } else if (p==0) { /* Child process - all done, just carry on */ if (pf) fclose(pf); + /* Close stdin, stdout and stderr; we don't need them any more */ + close(0); + close(1); + close(2); secnet_is_daemon=True; } else { /* Error */