summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-11-26 19:45:18 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-11-26 19:45:18 +0000
commit49b36e8fe50b2a18239c063bd3a5dc47efc052b6 (patch)
tree873fdb550e50ab043a33b711d754201245fa47ad
parent77bc8c31dfc660f8542afa8a1ecc55f05486e75a (diff)
downloadillumos-joyent-release-20141127.tar.gz
OS-3488 lxbrand 64bit LTP kill11 test failing for SIGPWR20141127release-20141127
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/signal.c9
-rw-r--r--usr/src/uts/common/brand/lx/os/lx_brand.c5
-rw-r--r--usr/src/uts/common/brand/lx/sys/lx_brand.h1
3 files changed, 13 insertions, 2 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 79621d0f94..1ba48cc0ea 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/signal.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/signal.c
@@ -1495,8 +1495,13 @@ lx_call_user_handler(int sig, siginfo_t *sip, void *p)
lx_debug("lxsap @ 0x%p", lxsap);
if ((sig == SIGPWR) && (lxsap->lxsa_handler == SIG_DFL)) {
- /* Linux SIG_DFL for SIGPWR is to terminate */
- exit(LX_SIGPWR | 0x80);
+ /*
+ * Linux SIG_DFL for SIGPWR is to terminate. The lx wait
+ * emulation will translate SIGPWR to LX_SIGPWR.
+ */
+ (void) syscall(SYS_brand, B_EXIT_AS_SIG, SIGPWR);
+ /* This should never return */
+ assert(0);
}
if (lxsap->lxsa_handler == SIG_DFL || lxsap->lxsa_handler == SIG_IGN)
diff --git a/usr/src/uts/common/brand/lx/os/lx_brand.c b/usr/src/uts/common/brand/lx/os/lx_brand.c
index e867233028..f278fe38d6 100644
--- a/usr/src/uts/common/brand/lx/os/lx_brand.c
+++ b/usr/src/uts/common/brand/lx/os/lx_brand.c
@@ -1090,6 +1090,11 @@ lx_brandsys(int cmd, int64_t *rval, uintptr_t arg1, uintptr_t arg2,
#endif
return (0);
+ case B_EXIT_AS_SIG:
+ exit(CLD_KILLED, (int)arg1);
+ /* NOTREACHED */
+ break;
+
case B_IKE_SYSCALL:
if (arg1 > LX_N_IKE_FUNCS)
return (EINVAL);
diff --git a/usr/src/uts/common/brand/lx/sys/lx_brand.h b/usr/src/uts/common/brand/lx/sys/lx_brand.h
index bef4a0c9a4..9e4b0dfe01 100644
--- a/usr/src/uts/common/brand/lx/sys/lx_brand.h
+++ b/usr/src/uts/common/brand/lx/sys/lx_brand.h
@@ -90,6 +90,7 @@ extern "C" {
#define B_CLR_NTV_SYSC_FLAG 138
#define B_SIGNAL_RETURN 139
#define B_UNWIND_NTV_SYSC_FLAG 140
+#define B_EXIT_AS_SIG 141
#define B_IKE_SYSCALL 192