trap.h revision 194127
159191Skris/*- 259191Skris * Copyright (c) 1991, 1993 359191Skris * The Regents of the University of California. All rights reserved. 476866Skris * 576866Skris * This code is derived from software contributed to Berkeley by 659191Skris * Kenneth Almquist. 759191Skris * 859191Skris * Redistribution and use in source and binary forms, with or without 976866Skris * modification, are permitted provided that the following conditions 1076866Skris * are met: 1189837Skris * 1. Redistributions of source code must retain the above copyright 12109998Smarkm * notice, this list of conditions and the following disclaimer. 13237657Sjkim * 2. Redistributions in binary form must reproduce the above copyright 1476866Skris * notice, this list of conditions and the following disclaimer in the 1576866Skris * documentation and/or other materials provided with the distribution. 1676866Skris * 4. Neither the name of the University nor the names of its contributors 1759191Skris * may be used to endorse or promote products derived from this software 1876866Skris * without specific prior written permission. 1976866Skris * 2076866Skris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2176866Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2259191Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2379998Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2459191Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2559191Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2659191Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2768651Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2859191Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2959191Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3068651Skris * SUCH DAMAGE. 3176866Skris * 3276866Skris * @(#)trap.h 8.3 (Berkeley) 6/5/95 3389837Skris * $FreeBSD: head/bin/sh/trap.h 194127 2009-06-13 21:10:41Z jilles $ 34109998Smarkm */ 35160814Ssimon 36194206Ssimonextern int pendingsigs; 37194206Ssimonextern int in_dotrap; 3876866Skrisextern volatile sig_atomic_t gotwinch; 3976866Skris 4076866Skrisint trapcmd(int, char **); 4176866Skrisvoid clear_traps(void); 4268651Skrisint have_traps(void); 4368651Skrisvoid setsignal(int); 44109998Smarkmvoid ignoresig(int); 4589837Skrisvoid onsig(int); 4668651Skrisvoid dotrap(void); 4776866Skrisvoid setinteractive(int); 48100936Snectarvoid exitshell(int); 49109998Smarkm