trap.c (218285) | trap.c (218306) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 */ 32 33#ifndef lint 34#if 0 35static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 */ 32 33#ifndef lint 34#if 0 35static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/bin/sh/trap.c 218285 2011-02-04 16:40:50Z jilles $"); | 39__FBSDID("$FreeBSD: head/bin/sh/trap.c 218306 2011-02-04 22:47:55Z jilles $"); |
40 41#include <signal.h> 42#include <unistd.h> 43#include <stdlib.h> 44 45#include "shell.h" 46#include "main.h" 47#include "nodes.h" /* for other headers */ --- 314 unchanged lines hidden (view full) --- 362 363 if (sigmode[signo] != S_IGN && sigmode[signo] != S_HARD_IGN) { 364 signal(signo, SIG_IGN); 365 } 366 sigmode[signo] = S_HARD_IGN; 367} 368 369 | 40 41#include <signal.h> 42#include <unistd.h> 43#include <stdlib.h> 44 45#include "shell.h" 46#include "main.h" 47#include "nodes.h" /* for other headers */ --- 314 unchanged lines hidden (view full) --- 362 363 if (sigmode[signo] != S_IGN && sigmode[signo] != S_HARD_IGN) { 364 signal(signo, SIG_IGN); 365 } 366 sigmode[signo] = S_HARD_IGN; 367} 368 369 |
370#ifdef mkinit 371INCLUDE <signal.h> 372INCLUDE "trap.h" 373 374SHELLPROC { 375 char *sm; 376 377 clear_traps(); 378 for (sm = sigmode ; sm < sigmode + NSIG ; sm++) { 379 if (*sm == S_IGN) 380 *sm = S_HARD_IGN; 381 } 382} 383#endif 384 385 | |
386/* 387 * Signal handler. 388 */ 389void 390onsig(int signo) 391{ 392 393 if (signo == SIGINT && trap[SIGINT] == NULL) { --- 145 unchanged lines hidden --- | 370/* 371 * Signal handler. 372 */ 373void 374onsig(int signo) 375{ 376 377 if (signo == SIGINT && trap[SIGINT] == NULL) { --- 145 unchanged lines hidden --- |