Fix signalpipe file descriptor leak on RESTART

Signals_Init() must only be called once.
This does not affect any ngircd release version.

Earlier version of this patch moved the io and sighandler
initialization before the while() loop, but as Alexander
Barton noticed that broke all systems without builtin select
support in io.c...
This commit is contained in:
Florian Westphal 2010-09-14 23:53:59 +02:00
parent b3cfbc3d28
commit ba720fcbae
1 changed files with 2 additions and 0 deletions

View File

@ -266,6 +266,8 @@ Signals_Init(void)
#ifdef HAVE_SIGACTION
struct sigaction saction;
#endif
if (signalpipe[0] > 0 || signalpipe[1] > 0)
return true;
if (pipe(signalpipe))
return false;