Deleted Added
full compact
trap.c (255157) trap.c (257399)
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 255157 2013-09-02 21:57:46Z jilles $");
39__FBSDID("$FreeBSD: head/bin/sh/trap.c 257399 2013-10-30 21:36:15Z 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 */

--- 309 unchanged lines hidden (view full) ---

357
358/*
359 * Ignore a signal.
360 */
361void
362ignoresig(int signo)
363{
364
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 */

--- 309 unchanged lines hidden (view full) ---

357
358/*
359 * Ignore a signal.
360 */
361void
362ignoresig(int signo)
363{
364
365 if (sigmode[signo] == 0)
366 setsignal(signo);
365 if (sigmode[signo] != S_IGN && sigmode[signo] != S_HARD_IGN) {
366 signal(signo, SIG_IGN);
367 if (sigmode[signo] != S_IGN && sigmode[signo] != S_HARD_IGN) {
368 signal(signo, SIG_IGN);
369 sigmode[signo] = S_IGN;
367 }
370 }
368 sigmode[signo] = S_HARD_IGN;
369}
370
371
372int
373issigchldtrapped(void)
374{
375
376 return (trap[SIGCHLD] != NULL && *trap[SIGCHLD] != '\0');

--- 182 unchanged lines hidden ---
371}
372
373
374int
375issigchldtrapped(void)
376{
377
378 return (trap[SIGCHLD] != NULL && *trap[SIGCHLD] != '\0');

--- 182 unchanged lines hidden ---