blob: c4a0b55e8ae02bec69a24f81acaf0c1b6e97b7ae [file] [log] [blame]
Elliott Hughesa0664b92017-04-18 17:46:52 -07001/* Make sure handling of NULL sigmask is correct.
2 https://bugs.kde.org/show_bug.cgi?id=364413
3 We might try to make a copy and adjust the mask.
4 Testcase provided by Paul Eggert <eggert@cs.ucla.edu> */
5
6#include <stdio.h>
7#include <stdlib.h>
8#include <sys/select.h>
9
10int
11main (void)
12{
13 struct timespec timeout;
14 timeout.tv_sec = 1;
15 timeout.tv_nsec = 0;
16 switch (pselect (0, 0, 0, 0, &timeout, 0))
17 {
18 default:
19 abort ();
20 case -1:
21 perror ("pselect");
22 return 1;
23 case 0:
24 return 0;
25 }
26}