diff svr-chansession.c @ 658:d4d0279710b9

- Initialise sa_mask properly
author Matt Johnston <matt@ucc.asn.au>
date Sun, 04 Dec 2011 05:41:46 +0800
parents 16af1decaf4c
children 0ad95abf8d3c
line wrap: on
line diff
--- a/svr-chansession.c	Tue Feb 21 23:00:30 2012 +0800
+++ b/svr-chansession.c	Sun Dec 04 05:41:46 2011 +0800
@@ -137,7 +137,7 @@
 
 	sa_chld.sa_handler = sesssigchild_handler;
 	sa_chld.sa_flags = SA_NOCLDSTOP;
-	sa_chld.sa_mask = 0;
+	sigemptyset(&sa_chld.sa_mask);
 	sigaction(SIGCHLD, &sa_chld, NULL);
 	TRACE(("leave sigchld handler"))
 }
@@ -981,6 +981,7 @@
 	svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */
 	sa_chld.sa_handler = sesssigchild_handler;
 	sa_chld.sa_flags = SA_NOCLDSTOP;
+	sigemptyset(&sa_chld.sa_mask);
 	if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
 		dropbear_exit("signal() error");
 	}