Skip to content

Commit 7b175b4

Browse files
committed
testdir43: try 2.
1 parent 05c3c25 commit 7b175b4

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

testdir43/gllib/sigdelay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sigdelay (int how, const sigset_t *restrict set, sigset_t *restrict old_set)
7676
sigaddset (old_set, sig);
7777

7878
for (int sig = 1; sig < countof (states); sig++)
79-
if (sigismember (set, sig))
79+
if (sigismember (set, sig) > 0)
8080
{
8181
switch (how)
8282
{

testdir43/gllib/sigprocmask.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ sigismember (const sigset_t *set, int sig)
136136
return (*set >> sig) & 1;
137137
}
138138
else
139-
return 0;
139+
{
140+
errno = EINVAL;
141+
return -1;
142+
}
140143
}
141144

142145
int

testdir43/gltests/test-pthread_sigmask2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ main ()
107107
before the call to pthread_sigmask() returns." */
108108
ASSERT (sigint_occurred == 1);
109109

110+
/* On SystemV derivatives, we need to reestablish the signal handler. */
111+
#if defined __sun || defined _AIX /* Solaris, AIX */
112+
signal (SIGINT, sigint_handler);
113+
#endif
114+
110115
/* Request a SIGINT signal from another thread. */
111116
ASSERT (pthread_create (&killer_thread2, NULL, killer_thread2_func, NULL)
112117
== 0);

testdir43/gltests/test-sigdelay2.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ main ()
104104
/* The signal should have arrived now. */
105105
ASSERT (sigint_occurred == 1);
106106

107+
/* On SystemV derivatives, we need to reestablish the signal handler. */
108+
#if defined __sun || defined _AIX /* Solaris, AIX */
109+
signal (SIGINT, sigint_handler);
110+
#endif
111+
107112
/* Request a SIGINT signal from another thread. */
108113
ASSERT (pthread_create (&killer_thread2, NULL, killer_thread2_func, NULL)
109114
== 0);

0 commit comments

Comments
 (0)