2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <sys/types.h>
14 static int sleepTime = 10;
17 printf("testproc received signal\n");
29 * The following signal action for AIX is necessary so that in case of a
30 * crash (i.e. core is generated) we can include the user's data section
31 * in the core dump. Unfortunately, by default, only a partial core is
32 * generated which, in many cases, isn't too useful.
36 sigemptyset(&nsa.sa_mask);
37 nsa.sa_handler = SIG_DFL;
38 nsa.sa_flags = SA_FULLDUMP;
39 sigaction(SIGSEGV, &nsa, NULL);
41 signal(SIGTERM, sigproc);
42 signal(SIGQUIT, sigproc);
44 if (strcmp(argv[i], "-ignore")==0) {
47 else if (strcmp(argv[i], "-sleep")==0) {
48 sleepTime = atoi(argv[i+1]);
52 printf("unrecognized option '%s', try one of\n", argv[i]);
53 printf("-ignore ignore SIGTERM signal\n");
54 printf("-sleep <n> sleep N seconds before exiting\n");