diff options
author | Rom Lemarchand <romlem@google.com> | 2013-01-29 00:12:32 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-01-29 00:13:25 +0000 |
commit | 2c3b2e12c15ac130bbfd806404dc735ed1ab8939 (patch) | |
tree | 5a53aacfbdf6de3e8b5d13f43b6c2eadae1d16e5 /logwrapper | |
parent | 665118f502baa3d3acaf6aa50c3dd14fdc14779d (diff) | |
parent | ed179d2f98c1628a593aec6d8408b621015f4de5 (diff) | |
download | system_core-2c3b2e12c15ac130bbfd806404dc735ed1ab8939.zip system_core-2c3b2e12c15ac130bbfd806404dc735ed1ab8939.tar.gz system_core-2c3b2e12c15ac130bbfd806404dc735ed1ab8939.tar.bz2 |
Merge "logwrap: Replace sigprocmask with pthread_sigmask"
Diffstat (limited to 'logwrapper')
-rw-r--r-- | logwrapper/logwrap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/logwrapper/logwrap.c b/logwrapper/logwrap.c index ccb2c10..f6a96e0 100644 --- a/logwrapper/logwrap.c +++ b/logwrapper/logwrap.c @@ -76,7 +76,7 @@ static int parent(const char *tag, int parent_read, int signal_fd, pid_t pid, sigemptyset(&chldset); sigaddset(&chldset, SIGCHLD); - sigprocmask(SIG_UNBLOCK, &chldset, NULL); + pthread_sigmask(SIG_UNBLOCK, &chldset, NULL); while (!found_child) { if (poll(poll_fds, remote_hung ? 1 : 2, -1) < 0) { @@ -215,7 +215,7 @@ int logwrap(int argc, char* argv[], int *status, bool ignore_int_quit) { sigaddset(&blockset, SIGINT); sigaddset(&blockset, SIGQUIT); sigaddset(&blockset, SIGCHLD); - sigprocmask(SIG_BLOCK, &blockset, &oldset); + pthread_sigmask(SIG_BLOCK, &blockset, &oldset); pid = fork(); if (pid < 0) { @@ -223,7 +223,7 @@ int logwrap(int argc, char* argv[], int *status, bool ignore_int_quit) { rc = -1; goto err_fork; } else if (pid == 0) { - sigprocmask(SIG_SETMASK, &oldset, NULL); + pthread_sigmask(SIG_SETMASK, &oldset, NULL); close(parent_ptty); child_ptty = open(child_devname, O_RDWR); @@ -286,7 +286,7 @@ err_socketpair: } sigaction(SIGCHLD, &oldchldact, NULL); err_fork: - sigprocmask(SIG_SETMASK, &oldset, NULL); + pthread_sigmask(SIG_SETMASK, &oldset, NULL); err_ptty: close(parent_ptty); err_open: |