summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-06-20 15:23:05 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-06-20 15:23:05 +0000
commit158f4dbcf60701c4d8de07146a38d78ab1b77dfe (patch)
tree93e401ca78fefee30972a0f9b76fc02defd317ec /usr/src/lib
parent45bb95d9cdaf14d6998c192509a67f6da0617971 (diff)
downloadillumos-joyent-158f4dbcf60701c4d8de07146a38d78ab1b77dfe.tar.gz
OS-5431 under many conditions, ptrace (strace) on Ubuntu 16 shows syscalls return ENOSYS
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/signal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/signal.c b/usr/src/lib/brand/lx/lx_brand/common/signal.c
index 80f1bf09a1..7d07dfe66d 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/signal.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/signal.c
@@ -25,7 +25,7 @@
*/
/*
- * Copyright 2015 Joyent, Inc. All rights reserved.
+ * Copyright 2016 Joyent, Inc. All rights reserved.
*/
#include <sys/types.h>
@@ -1077,6 +1077,12 @@ lx_rt_sigreturn(void)
ucontext_t *retucp;
uintptr_t sp;
+ /*
+ * Since we don't take the normal return path from this syscall, we
+ * inform the kernel that we're returning, for the sake of ptrace.
+ */
+ (void) syscall(SYS_brand, B_PTRACE_SIG_RETURN);
+
/* Get the registers at the emulated Linux rt_sigreturn syscall */
ucp = lx_syscall_regs();