summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-04-15 14:46:49 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-04-15 14:46:49 +0000
commit8d5c46d3edb5664f43c88d5e7a86fa5740fd82f2 (patch)
treed8a7b72e6258fe0bae4dec2842c7cd82290475de /usr/src
parent0b025ca9f33778615a7c62db434d7bac92dc4269 (diff)
downloadillumos-joyent-8d5c46d3edb5664f43c88d5e7a86fa5740fd82f2.tar.gz
OS-2915 lxbrand ptrace should clear signal traps when setting options [still catch SIGTRAP]
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/ptrace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/ptrace.c b/usr/src/lib/brand/lx/lx_brand/common/ptrace.c
index 3dfa28e399..57bd91ae27 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/ptrace.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/ptrace.c
@@ -1720,10 +1720,11 @@ ptrace_setoptions(pid_t pid, int options)
error = -errno;
}
- /* since we're doing option tracing now, turn off signal traps */
+ /* since we're doing option tracing now, only catch sigtrap */
if (error == 0) {
ctl.cmd = PCSTRACE;
premptyset(&ctl.arg.signals);
+ praddset(&ctl.arg.signals, SIGTRAP);
size = sizeof (long) + sizeof (sigset_t);
if (write(fd, &ctl, size) != size)
error = -errno;