Fix compat personality support for sgetmask syscall
* signal.c (SYS_FUNC(sgetmask)): Replace sprintsigmask_val with sprint_old_sigmask_val. * tests/sxetmask.c (main): Check decoding of signal mask containing RT signals.
This commit is contained in:
parent
ba0bd3f1ec
commit
3b97ee486b
2
signal.c
2
signal.c
@ -397,7 +397,7 @@ SYS_FUNC(signal)
|
|||||||
SYS_FUNC(sgetmask)
|
SYS_FUNC(sgetmask)
|
||||||
{
|
{
|
||||||
if (exiting(tcp) && !syserror(tcp)) {
|
if (exiting(tcp) && !syserror(tcp)) {
|
||||||
tcp->auxstr = sprintsigmask_val("mask ", tcp->u_rval);
|
tcp->auxstr = sprint_old_sigmask_val("mask ", tcp->u_rval);
|
||||||
return RVAL_HEX | RVAL_STR;
|
return RVAL_HEX | RVAL_STR;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -99,6 +99,18 @@ main(void)
|
|||||||
if (uget.old_mask != (unsigned long) rc)
|
if (uget.old_mask != (unsigned long) rc)
|
||||||
error_msg_and_fail("sigprocmask returned %#lx",
|
error_msg_and_fail("sigprocmask returned %#lx",
|
||||||
uget.old_mask);
|
uget.old_mask);
|
||||||
|
|
||||||
|
if (sizeof(long) > 4) {
|
||||||
|
sigaddset(&uset.libc_mask, 32 + 27);
|
||||||
|
if (sigprocmask(SIG_SETMASK, &uset.libc_mask, NULL))
|
||||||
|
perror_msg_and_fail("sigprocmask");
|
||||||
|
rc = k_sgetmask();
|
||||||
|
printf("sgetmask() = %#lx"
|
||||||
|
" (mask [USR1 USR2 RT_27])\n", rc);
|
||||||
|
if (uset.old_mask != (unsigned long) rc)
|
||||||
|
error_msg_and_fail("sigprocmask set %#lx",
|
||||||
|
uset.old_mask);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
puts("+++ exited with 0 +++");
|
puts("+++ exited with 0 +++");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user