Back out my previous attempt to fix SIGINT/SIGTERM behaviour

This commit is contained in:
Martin Cracauer 1998-02-06 23:50:39 +00:00
parent 3142ca45f1
commit 8624242ab8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33142

View File

@ -85,9 +85,6 @@ MKINIT pid_t backgndpid = -1; /* pid of last background process */
int initialpgrp; /* pgrp of shell on invocation */
int curjob; /* current job */
#endif
sig_t oldsigint;
sig_t oldsigquit;
int oldsigs_valid = 0;
#if JOBS
STATIC void restartjob __P((struct job *));
@ -577,11 +574,6 @@ forkshell(jp, n, mode)
TRACE(("forkshell(%%%d, 0x%lx, %d) called\n", jp - jobtab, (long)n,
mode));
INTOFF;
if (mode == FORK_FG) {
oldsigquit = signal(SIGQUIT,SIG_IGN);
oldsigint = signal(SIGINT,SIG_IGN);
oldsigs_valid = 1;
}
pid = fork();
if (pid == -1) {
TRACE(("Fork failed, errno=%d\n", errno));
@ -594,8 +586,6 @@ forkshell(jp, n, mode)
int i;
TRACE(("Child shell %d\n", getpid()));
signal(SIGQUIT,SIG_DFL);
signal(SIGINT,SIG_DFL);
wasroot = rootshell;
rootshell = 0;
for (i = njobs, p = jobtab ; --i >= 0 ; p++)
@ -710,12 +700,6 @@ waitforjob(jp)
while (jp->state == 0) {
dowait(1, jp);
}
if (oldsigs_valid) {
signal(SIGQUIT,oldsigquit);
signal(SIGINT,oldsigint);
oldsigs_valid = 0;
}
#if JOBS
if (jp->jobctl) {
#ifdef OLD_TTY_DRIVER