]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: util: Signal handling - change CatchChild() and CatchChildLeaveStatus() to retur...
authorJeremy Allison <jra@samba.org>
Thu, 9 Oct 2014 20:41:05 +0000 (13:41 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 13 Oct 2014 19:20:07 +0000 (21:20 +0200)
Bug #10831 - SIGCLD Signal handler not correctly reinstalled on old library code use - smbrun etc.

https://bugzilla.samba.org/show_bug.cgi?id=10831

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
lib/util/samba_util.h
lib/util/signal.c

index c061721e6517296e669d4f0f6d69ca856dd33ce9..3c1874f54e152fa55f27cf2cfb39d68f3c2750ad 100644 (file)
@@ -104,12 +104,12 @@ void (*CatchSignal(int signum,void (*handler)(int )))(int);
 /**
  Ignore SIGCLD via whatever means is necessary for this OS.
 **/
-void CatchChild(void);
+void (*CatchChild(void))(int);
 
 /**
  Catch SIGCLD but leave the child around so it's status can be reaped.
 **/
-void CatchChildLeaveStatus(void);
+void (*CatchChildLeaveStatus(void))(int);
 
 struct sockaddr;
 
index ead947eb5e63332015774a8265942aa995f65dbf..33a9900fb40019fee0eb665e9b4cbd1bbfe5bf9e 100644 (file)
@@ -129,16 +129,16 @@ void (*CatchSignal(int signum,void (*handler)(int )))(int)
  Ignore SIGCLD via whatever means is necessary for this OS.
 **/
 
-void CatchChild(void)
+void (*CatchChild(void))(int)
 {
-       CatchSignal(SIGCLD, sig_cld);
+       return CatchSignal(SIGCLD, sig_cld);
 }
 
 /**
  Catch SIGCLD but leave the child around so it's status can be reaped.
 **/
 
-void CatchChildLeaveStatus(void)
+void (*CatchChildLeaveStatus(void))(int)
 {
-       CatchSignal(SIGCLD, sig_cld_leave_status);
+       return CatchSignal(SIGCLD, sig_cld_leave_status);
 }