mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
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
1 changed files with 10 additions and 0 deletions
|
@ -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(SIGTTIN,SIG_DFL);
|
||||||
signal(SIGTTOU,SIG_DFL);
|
signal(SIGTTOU,SIG_DFL);
|
||||||
|
signal(SIGTSTP,SIG_DFL);
|
||||||
}
|
}
|
||||||
#endif /* SIGTSTP */
|
#endif /* SIGTSTP */
|
||||||
#ifdef JOBS
|
#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(SIGTTIN,SIG_IGN);
|
||||||
signal(SIGTTOU,SIG_IGN);
|
signal(SIGTTOU,SIG_IGN);
|
||||||
|
if(sh_isstate(SH_INTERACTIVE))
|
||||||
|
signal(SIGTSTP,SIG_IGN);
|
||||||
|
else
|
||||||
|
signal(SIGTSTP,SIG_DFL);
|
||||||
}
|
}
|
||||||
#endif /* SIGTSTP */
|
#endif /* SIGTSTP */
|
||||||
if(spawnpid>0)
|
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(SIGTTIN,SIG_DFL);
|
||||||
signal(SIGTTOU,SIG_DFL);
|
signal(SIGTTOU,SIG_DFL);
|
||||||
|
signal(SIGTSTP,SIG_DFL);
|
||||||
jobwasset++;
|
jobwasset++;
|
||||||
}
|
}
|
||||||
#endif /* SIGTSTP */
|
#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(SIGTTIN,SIG_IGN);
|
||||||
signal(SIGTTOU,SIG_IGN);
|
signal(SIGTTOU,SIG_IGN);
|
||||||
|
if(sh_isstate(SH_INTERACTIVE))
|
||||||
|
signal(SIGTSTP,SIG_IGN);
|
||||||
|
else
|
||||||
|
signal(SIGTSTP,SIG_DFL);
|
||||||
}
|
}
|
||||||
#endif /* SIGTSTP */
|
#endif /* SIGTSTP */
|
||||||
if(sigwasset)
|
if(sigwasset)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue