sh_ntfork(): handle SIGTSTP along with SIGTTIN and SIGTTOU
This applies a patch from OpenSUSE that makes SIGTSTP handling consistent with that of SIGTTIN and SIGTTOU. https://build.opensuse.org/package/view_file/shells/ksh/ksh93-signals.dif
This commit is contained in:
parent
8a58166bc4
commit
fa3a3d7955
|
|
@ -3573,6 +3573,7 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
|
|||
{
|
||||
signal(SIGTTIN,SIG_DFL);
|
||||
signal(SIGTTOU,SIG_DFL);
|
||||
signal(SIGTSTP,SIG_DFL);
|
||||
}
|
||||
#endif /* SIGTSTP */
|
||||
#ifdef JOBS
|
||||
|
|
@ -3610,6 +3611,10 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
|
|||
{
|
||||
signal(SIGTTIN,SIG_IGN);
|
||||
signal(SIGTTOU,SIG_IGN);
|
||||
if(sh_isstate(SH_INTERACTIVE))
|
||||
signal(SIGTSTP,SIG_IGN);
|
||||
else
|
||||
signal(SIGTSTP,SIG_DFL);
|
||||
}
|
||||
#endif /* SIGTSTP */
|
||||
if(spawnpid>0)
|
||||
|
|
@ -3695,6 +3700,7 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
|
|||
{
|
||||
signal(SIGTTIN,SIG_DFL);
|
||||
signal(SIGTTOU,SIG_DFL);
|
||||
signal(SIGTSTP,SIG_DFL);
|
||||
jobwasset++;
|
||||
}
|
||||
#endif /* SIGTSTP */
|
||||
|
|
@ -3758,6 +3764,10 @@ static pid_t sh_ntfork(Shell_t *shp,const Shnode_t *t,char *argv[],int *jobid,in
|
|||
{
|
||||
signal(SIGTTIN,SIG_IGN);
|
||||
signal(SIGTTOU,SIG_IGN);
|
||||
if(sh_isstate(SH_INTERACTIVE))
|
||||
signal(SIGTSTP,SIG_IGN);
|
||||
else
|
||||
signal(SIGTSTP,SIG_DFL);
|
||||
}
|
||||
#endif /* SIGTSTP */
|
||||
if(sigwasset)
|
||||
|
|
|
|||
Loading…
Reference in New Issue