1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-09 13:57:42 +03:00

clients: fix some signal handler issues

This commit is contained in:
Lennart Poettering 2013-11-08 13:57:18 +01:00
parent cbc9fbd131
commit 9d458c0902
2 changed files with 3 additions and 3 deletions

View File

@ -262,6 +262,8 @@ static int do_accept(const char* name, char **argv, char **envp, int fd) {
/* SIGCHLD handler. */
static void sigchld_hdl(int sig, siginfo_t *t, void *data) {
PROTECT_ERRNO;
log_info("Child %d died with code %d", t->si_pid, t->si_status);
/* Wait for a dead child. */
waitpid(t->si_pid, NULL, 0);

View File

@ -66,7 +66,7 @@ static void print_device(struct udev_device *device, const char *source, int pro
static int adm_monitor(struct udev *udev, int argc, char *argv[])
{
struct sigaction act;
struct sigaction act = {};
sigset_t mask;
int option;
bool prop = false;
@ -149,9 +149,7 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[])
}
/* set signal handlers */
memset(&act, 0x00, sizeof(struct sigaction));
act.sa_handler = sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);