Module: ngircd.git Branch: master Commit: ba720fcbaeaacee700d7d23936cf481e6fcb83b1 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=ba720...
Author: Florian Westphal fw@strlen.de Date: Tue Sep 14 23:53:59 2010 +0200
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...
---
src/ngircd/sighandlers.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/sighandlers.c b/src/ngircd/sighandlers.c index aaff1ea..80eef3e 100644 --- a/src/ngircd/sighandlers.c +++ b/src/ngircd/sighandlers.c @@ -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;
ngircd-commits@lists.barton.de