Mercurial > dropbear
comparison svr-main.c @ 658:d4d0279710b9
- Initialise sa_mask properly
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 04 Dec 2011 05:41:46 +0800 |
parents | 67fbba2c2a85 |
children | 167fdc091c05 |
comparison
equal
deleted
inserted
replaced
657:16af1decaf4c | 658:d4d0279710b9 |
---|---|
368 } | 368 } |
369 | 369 |
370 /* catch and reap zombie children */ | 370 /* catch and reap zombie children */ |
371 sa_chld.sa_handler = sigchld_handler; | 371 sa_chld.sa_handler = sigchld_handler; |
372 sa_chld.sa_flags = SA_NOCLDSTOP; | 372 sa_chld.sa_flags = SA_NOCLDSTOP; |
373 sa_chld.sa_mask = 0; | 373 sigemptyset(&sa_chld.sa_mask); |
374 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { | 374 if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) { |
375 dropbear_exit("signal() error"); | 375 dropbear_exit("signal() error"); |
376 } | 376 } |
377 if (signal(SIGSEGV, sigsegv_handler) == SIG_ERR) { | 377 if (signal(SIGSEGV, sigsegv_handler) == SIG_ERR) { |
378 dropbear_exit("signal() error"); | 378 dropbear_exit("signal() error"); |