trap.c (00d02f943bbcd6ec85092821e9ee4d8adca83c83) trap.c (cb806389dba30cf9f34b6290a9250c0d6e5fdced)
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

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

411 /*
412 * Ignore SIGCHLD to avoid infinite
413 * recursion if the trap action does
414 * a fork.
415 */
416 if (i == SIGCHLD)
417 ignore_sigchld++;
418 savestatus = exitstatus;
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

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

411 /*
412 * Ignore SIGCHLD to avoid infinite
413 * recursion if the trap action does
414 * a fork.
415 */
416 if (i == SIGCHLD)
417 ignore_sigchld++;
418 savestatus = exitstatus;
419 evalstring(trap[i]);
419 evalstring(trap[i], 0);
420 exitstatus = savestatus;
421 if (i == SIGCHLD)
422 ignore_sigchld--;
423 }
424 break;
425 }
426 }
427 if (i >= NSIG)

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

466 goto l1;
467 }
468 if (setjmp(loc2.loc)) {
469 goto l2;
470 }
471 handler = &loc1;
472 if ((p = trap[0]) != NULL && *p != '\0') {
473 trap[0] = NULL;
420 exitstatus = savestatus;
421 if (i == SIGCHLD)
422 ignore_sigchld--;
423 }
424 break;
425 }
426 }
427 if (i >= NSIG)

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

466 goto l1;
467 }
468 if (setjmp(loc2.loc)) {
469 goto l2;
470 }
471 handler = &loc1;
472 if ((p = trap[0]) != NULL && *p != '\0') {
473 trap[0] = NULL;
474 evalstring(p);
474 evalstring(p, 0);
475 }
476l1: handler = &loc2; /* probably unnecessary */
477 flushall();
478#if JOBS
479 setjobctl(0);
480#endif
481l2: _exit(status);
482}
475 }
476l1: handler = &loc2; /* probably unnecessary */
477 flushall();
478#if JOBS
479 setjobctl(0);
480#endif
481l2: _exit(status);
482}