Elliott Hughes | a0664b9 | 2017-04-18 17:46:52 -0700 | [diff] [blame^] | 1 | /* 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 | |
| 10 | int |
| 11 | main (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 | } |