trap.h revision 330897
1178889Sjulian/*- 2178889Sjulian * SPDX-License-Identifier: BSD-3-Clause 3178889Sjulian * 4178889Sjulian * Copyright (c) 1991, 1993 5178889Sjulian * The Regents of the University of California. All rights reserved. 6178889Sjulian * 7178889Sjulian * This code is derived from software contributed to Berkeley by 8178889Sjulian * Kenneth Almquist. 9178889Sjulian * 10178889Sjulian * Redistribution and use in source and binary forms, with or without 11178889Sjulian * modification, are permitted provided that the following conditions 12178889Sjulian * are met: 13178889Sjulian * 1. Redistributions of source code must retain the above copyright 14178889Sjulian * notice, this list of conditions and the following disclaimer. 15178889Sjulian * 2. Redistributions in binary form must reproduce the above copyright 16178889Sjulian * notice, this list of conditions and the following disclaimer in the 17178889Sjulian * documentation and/or other materials provided with the distribution. 18178889Sjulian * 4. Neither the name of the University nor the names of its contributors 19178889Sjulian * may be used to endorse or promote products derived from this software 20178889Sjulian * without specific prior written permission. 21178889Sjulian * 22178889Sjulian * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23178889Sjulian * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24178889Sjulian * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25178889Sjulian * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26178889Sjulian * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27233160Sbjk * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28178889Sjulian * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29178889Sjulian * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30178889Sjulian * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31178889Sjulian * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32178889Sjulian * SUCH DAMAGE. 33178889Sjulian * 34178889Sjulian * @(#)trap.h 8.3 (Berkeley) 6/5/95 35178889Sjulian * $FreeBSD: stable/11/bin/sh/trap.h 330897 2018-03-14 03:19:51Z eadler $ 36181440Sdelphij */ 37178889Sjulian 38178889Sjulianextern volatile sig_atomic_t pendingsig; 39178889Sjulianextern volatile sig_atomic_t pendingsig_waitcmd; 40178889Sjulian 41178889Sjulianvoid clear_traps(void); 42178889Sjulianint have_traps(void); 43178889Sjulianvoid setsignal(int); 44178889Sjulianvoid ignoresig(int); 45178889Sjulianint issigchldtrapped(void); 46178889Sjulianvoid onsig(int); 47178889Sjulianvoid dotrap(void); 48233160Sbjkvoid setinteractive(int); 49233160Sbjkvoid exitshell(int) __dead2; 50233161Sbjkvoid exitshell_savedstatus(void) __dead2; 51178909Sbrueffer