• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2003, Intel Corporation. All rights reserved.
3  * Created by:  salwan.searty REMOVE-THIS AT intel DOT com
4  * This file is licensed under the GPL license.  For the full content
5  * of this license, see the COPYING file at the top level of this
6  * source tree.
7 
8  This program tests the assertion that when unsuccessful, SIG_ERROR
9  shall be returned, and errno set to EINVAL.
10 
11 */
12 
13 #define _XOPEN_SOURCE 600
14 
15 #include <signal.h>
16 #include <stdio.h>
17 #include <stdlib.h>
18 #include <errno.h>
19 #include "posixtest.h"
20 
main(void)21 int main(void)
22 {
23 	if (sigset(SIGKILL, SIG_IGN) == SIG_ERR) {
24 		if (errno != EINVAL) {
25 			printf
26 			    ("Test FAILED: sigset() returned SIG_ERR but didn't set errno to EINVAL\n");
27 			return PTS_FAIL;
28 		}
29 	} else {
30 		printf
31 		    ("Test FAILED: sigset() didn't return SIG_ERROR even though SIGKILL was passed to it\n");
32 		return PTS_FAIL;
33 	}
34 
35 	return PTS_PASS;
36 }
37