• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 
3  * Copyright (c) 2002-2003, Intel Corporation. All rights reserved.
4  * Created by:  rusty.lynch REMOVE-THIS AT intel DOT com
5  * This file is licensed under the GPL license.  For the full content
6  * of this license, see the COPYING file at the top level of this
7  * source tree.
8 
9   Test case for assertion #4 of the sigaction system call that shows
10   that attempting to add SIGKILL to the signal mask of SIGALRM will
11   not result in sigaction returning -1
12 */
13 
14 #include <signal.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <sys/wait.h>
18 #include <unistd.h>
19 #include "posixtest.h"
20 
handler(int signo)21 void handler(int signo)
22 {
23 }
24 
main(void)25 int main(void)
26 {
27 	struct sigaction act;
28 
29 	act.sa_handler = handler;
30 	act.sa_flags = 0;
31 	sigemptyset(&act.sa_mask);
32 	sigaddset(&act.sa_mask, SIGKILL);
33 	if (sigaction(SIGALRM, &act, 0) == -1) {
34 		printf("Test FAILED\n");
35 		return PTS_FAIL;
36 	}
37 
38 	printf("Test PASSED\n");
39 	return PTS_PASS;
40 }
41