/* * Copyright (c) 2003, Intel Corporation. All rights reserved. * Created by: salwan.searty REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. This program tests the assertion that the process's signal mask will be restored to the state that it was in prior to the delivery of the signal Steps: 1. Empty the signal mask 2. Deliver the signal 3. When we return from the signal handler, verify that the signal mask is still empty, otherwise fail. */ #define _XOPEN_SOURCE 600 #include #include #include #include "posixtest.h" #define NUMSIGNALS 26 int is_empty(sigset_t *set) { int i; int siglist[] = {SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ }; for (i=0; i