Fix sigprocmask
1. SIGSTOP and SIGKILL should not be used as test. In g_some_signals, SIGKILL is used. 2. The SIGSTOP and SIGKILL flags of current task are set so we need to delete them.
This commit is contained in:
parent
2e5139eba4
commit
9f2f86441d
@ -44,11 +44,11 @@
|
||||
|
||||
static int g_some_signals[NSIGNALS] =
|
||||
{
|
||||
1,
|
||||
3,
|
||||
5,
|
||||
7,
|
||||
9
|
||||
SIGHUP,
|
||||
SIGQUIT,
|
||||
SIGTRAP,
|
||||
SIGBUS,
|
||||
SIGUSR1
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@ -223,6 +223,24 @@ void sigprocmask_test(void)
|
||||
goto errout_with_mask;
|
||||
}
|
||||
|
||||
ret = sigdelset(&currmask, SIGKILL);
|
||||
if (ret != OK)
|
||||
{
|
||||
int errcode = errno;
|
||||
printf("sigprocmask_test: ERROR sigprocmask failed: %d\n", errcode);
|
||||
ASSERT(false);
|
||||
goto errout_with_mask;
|
||||
}
|
||||
|
||||
ret = sigdelset(&currmask, SIGSTOP);
|
||||
if (ret != OK)
|
||||
{
|
||||
int errcode = errno;
|
||||
printf("sigprocmask_test: ERROR sigprocmask failed: %d\n", errcode);
|
||||
ASSERT(false);
|
||||
goto errout_with_mask;
|
||||
}
|
||||
|
||||
/* It should be the same as newmask */
|
||||
|
||||
if (memcmp(&currmask, &newmask, sizeof(sigset_t)) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user