• 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 if signal has been blocked, then
9  sigset shall return SIG_HOLD
10 
11 */
12 
13 
14 #include <signal.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <errno.h>
18 #include <string.h>
19 #include "posixtest.h"
20 
main(void)21 int main(void)
22 {
23 	sigset_t st;
24 	sigemptyset(&st);
25 	sigaddset(&st, SIGCHLD);
26 
27 	if (sigprocmask(SIG_BLOCK, &st, NULL) < 0) {
28 		printf("Test FAILED: sigprocmask(): %s\n", strerror(errno));
29 		return PTS_FAIL;
30 	}
31 
32 	if (sigset(SIGCHLD, SIG_HOLD) != SIG_HOLD) {
33 		printf("Test FAILED: sigset() didn't return SIG_HOLD\n");
34 		return PTS_FAIL;
35 	}
36 
37 	return PTS_PASS;
38 }
39