1Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. 2DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 4This code is free software; you can redistribute it and/or modify it 5under the terms of the GNU General Public License version 2 only, as 6published by the Free Software Foundation. 7 8This code is distributed in the hope that it will be useful, but WITHOUT 9ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11version 2 for more details (a copy is included in the LICENSE file that 12accompanied this code). 13 14You should have received a copy of the GNU General Public License version 152 along with this work; if not, write to the Free Software Foundation, 16Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 18Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19or visit www.oracle.com if you need additional information or have any 20questions. 21 22 23Briefly, the tests cover the following scenarios: 241. prepre 25 set signal handlers -> create JVM -> send signals -> destroy JVM -> check signal handlers were called 26 272. prepost 28 set signal handlers -> create JVM -> destroy JVM -> send signals -> check signal handlers were called 29 303. postpre 31 create JVM ->set signal handlers -> send signals -> destroy JVM -> check signal handlers were called 32 334. postpost 34 create JVM -> set signal handlers -> destroy JVM -> send signals -> check signal handlers were called 35 36There is one more scenario called 'nojvm'. 37In this case no jvm is created, so pure signal testing is done. 38 39Signal handlers don't do anything, so the only fact that signal handler was called is checked. 40Also 2 different ways of setting signal handlers are tested: sigaction, sigset. 41 42For 'postpre' and 'postpro' libjsig.so is used to chain signal handlers behind VM installed ones. 43 44=> Current tests cover the following cases (don't count 'nojvm' scenario): 451. Support for pre-installed signal handlers when the HotSpot VM is created. 462. Support for signal handler installation after the HotSpot VM is created inside JNI code 47 48 49Notes: 50 51SIGQUIT, SIGTERM, SIGINT, and SIGHUP signals cannot be chained. 52If the application needs to handle these signals, the -Xrs option needs 53to be specified. So, test these signals only with -Xrs flag. 54 55On Linux and Mac OS X, SIGUSR2 is used to implement suspend and resume. So, 56don't test SIGUSR2 on Linux and Mac OS X. 57 58SIGJVM1 and SIGJVM2 exist only on Solaris and are reserved for exclusive use 59by the JVM. So don't test SIGJVM1 and SIGJVM2. 60