mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 17:31:43 +01:00
Back out my previous attempt to fix SIGINT/SIGTERM behaviour
This commit is contained in:
parent
3142ca45f1
commit
8624242ab8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33142
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user