6fd7b98491
OBS-URL: https://build.opensuse.org/package/show/shells/ksh?expand=0&rev=ba69cf3bd4d9d8e7a3cf16460f0e2cd9
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
--- src/cmd/ksh93/data/signals.c
|
|
+++ src/cmd/ksh93/data/signals.c 2008-09-11 15:49:02.645531304 +0000
|
|
@@ -18,6 +18,8 @@
|
|
* *
|
|
***********************************************************************/
|
|
#include <ast.h>
|
|
+#include <cmd.h>
|
|
+#include <jobs.h>
|
|
#include "shtable.h"
|
|
#include "fault.h"
|
|
|
|
--- src/cmd/ksh93/sh/jobs.c
|
|
+++ src/cmd/ksh93/sh/jobs.c 2010-03-03 14:17:34.812626467 +0100
|
|
@@ -279,7 +279,7 @@ int job_reap(register int sig)
|
|
}
|
|
pid = waitpid((pid_t)-1,&wstat,flags);
|
|
sh_offstate(SH_TTYWAIT);
|
|
-
|
|
+#ifdef WCONTINUED
|
|
/*
|
|
* some systems (linux 2.6) may return EINVAL
|
|
* when there are no continued children
|
|
@@ -287,6 +287,7 @@ int job_reap(register int sig)
|
|
|
|
if (pid<0 && errno==EINVAL && (flags&WCONTINUED))
|
|
pid = waitpid((pid_t)-1,&wstat,flags&=~WCONTINUED);
|
|
+#endif
|
|
sh_sigcheck();
|
|
if(pid<0 && errno==EINTR && (sig||job.savesig))
|
|
continue;
|
|
--- src/cmd/ksh93/sh/xec.c
|
|
+++ src/cmd/ksh93/sh/xec.c 2007-12-21 13:28:04.000000000 +0100
|
|
@@ -2894,6 +2894,7 @@ static pid_t sh_ntfork(Shell_t *shp,cons
|
|
{
|
|
signal(SIGTTIN,SIG_DFL);
|
|
signal(SIGTTOU,SIG_DFL);
|
|
+ signal(SIGTSTP,SIG_DFL);
|
|
}
|
|
#endif /* SIGTSTP */
|
|
#ifdef JOBS
|
|
@@ -2931,6 +2932,9 @@ static pid_t sh_ntfork(Shell_t *shp,cons
|
|
{
|
|
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)
|
|
@@ -3011,6 +3015,7 @@ static pid_t sh_ntfork(Shell_t *shp,cons
|
|
{
|
|
signal(SIGTTIN,SIG_DFL);
|
|
signal(SIGTTOU,SIG_DFL);
|
|
+ signal(SIGTSTP,SIG_DFL);
|
|
jobwasset++;
|
|
}
|
|
#endif /* SIGTSTP */
|
|
@@ -3069,6 +3074,9 @@ static pid_t sh_ntfork(Shell_t *shp,cons
|
|
{
|
|
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)
|