From ef6ea6ee329bcc48613340d2f369b651559d85dd Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 31 Jan 2022 10:24:13 +0100 Subject: [PATCH] When using "RESTART" the newly started IRCd could possibly not log or been missing other functionality. Reported by DarthGandalf in https://bugs.unrealircd.org/view.php?id=5918 The cause was that all fd's were closed, including 0/1/2. We now reopen those and map them to /dev/null, like we do later again. --- src/misc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/misc.c b/src/misc.c index 8ebde1667..2d381ef96 100644 --- a/src/misc.c +++ b/src/misc.c @@ -2480,6 +2480,7 @@ void server_reboot(const char *mesg) (void)close(2); (void)close(1); (void)close(0); + close_std_descriptors(); (void)execv(MYNAME, myargv); #else close_connections();