summaryrefslogtreecommitdiffstats
path: root/source/ap/ksh93/patches/ksh-20120801-kshmfix.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/ap/ksh93/patches/ksh-20120801-kshmfix.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-slackware-14.2.tar.gz
current-slackware-14.2.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/ap/ksh93/patches/ksh-20120801-kshmfix.patch')
-rw-r--r--source/ap/ksh93/patches/ksh-20120801-kshmfix.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/source/ap/ksh93/patches/ksh-20120801-kshmfix.patch b/source/ap/ksh93/patches/ksh-20120801-kshmfix.patch
new file mode 100644
index 000000000..cc6840666
--- /dev/null
+++ b/source/ap/ksh93/patches/ksh-20120801-kshmfix.patch
@@ -0,0 +1,66 @@
+diff -up ksh-20120801/src/cmd/ksh93/sh/main.c.monintoron ksh-20120801/src/cmd/ksh93/sh/main.c
+--- ksh-20120801/src/cmd/ksh93/sh/main.c.monintoron 2013-05-31 10:15:02.738828102 +0200
++++ ksh-20120801/src/cmd/ksh93/sh/main.c 2013-05-31 10:15:36.057095262 +0200
+@@ -406,10 +406,10 @@ static void exfile(register Shell_t *shp
+ {
+ buff.mode = SH_JMPEXIT;
+ sh_onoption(SH_TRACKALL);
+- sh_offoption(SH_MONITOR);
+ }
+ sh_offstate(SH_INTERACTIVE);
+- sh_offstate(SH_MONITOR);
++ if(sh_isoption(SH_MONITOR))
++ sh_onstate(SH_MONITOR);
+ sh_offstate(SH_HISTORY);
+ sh_offoption(SH_HISTORY);
+ }
+diff -up ksh-20120801/src/cmd/ksh93/sh/jobs.c.orig ksh-20120801/src/cmd/ksh93/sh/jobs.c
+--- ksh-20120801/src/cmd/ksh93/sh/jobs.c.orig 2013-05-31 10:12:28.358590452 +0200
++++ ksh-20120801/src/cmd/ksh93/sh/jobs.c 2013-05-31 10:16:51.203697890 +0200
+@@ -548,7 +548,7 @@ int job_reap(register int sig)
+ {
+ px = job_byjid((int)pw->p_job);
+ for(; px && (px->p_flag&P_DONE); px=px->p_nxtproc);
+- if(!px)
++ if(!px && sh_isoption(SH_INTERACTIVE))
+ tcsetpgrp(JOBTTY,job.mypid);
+ }
+ #ifndef SHOPT_BGX
+@@ -842,10 +842,11 @@ static void job_set(register struct proc
+
+ static void job_reset(register struct process *pw)
+ {
++ Shell_t *shp = pw->p_shp;
+ /* save the terminal state for current job */
+ #ifdef SIGTSTP
+ job_fgrp(pw,tcgetpgrp(job.fd));
+- if(tcsetpgrp(job.fd,job.mypid) !=0)
++ if(sh_isoption(SH_INTERACTIVE) && tcsetpgrp(job.fd,job.mypid) !=0)
+ return;
+ #endif /* SIGTSTP */
+ /* force the following tty_get() to do a tcgetattr() unless fg */
+diff -up ksh-20120801/src/cmd/ksh93/sh/xec.c.orig ksh-20120801/src/cmd/ksh93/sh/xec.c
+--- ksh-20120801/src/cmd/ksh93/sh/xec.c.orig 2013-05-31 10:12:27.000000000 +0200
++++ ksh-20120801/src/cmd/ksh93/sh/xec.c 2013-05-31 10:18:14.650367185 +0200
+@@ -2201,7 +2201,7 @@ int sh_exec(register const Shnode_t *t,
+ }
+ shp->exitval = n;
+ #ifdef SIGTSTP
+- if(!pipejob && sh_isstate(SH_MONITOR))
++ if(!pipejob && sh_isstate(SH_MONITOR) && sh_isoption(SH_INTERACTIVE))
+ tcsetpgrp(JOBTTY,shp->gd->pid);
+ #endif /*SIGTSTP */
+ job.curpgid = savepgid;
+diff -up ksh-20120801/src/cmd/ksh93/edit/edit.c.kshmfix ksh-20120801/src/cmd/ksh93/edit/edit.c
+--- ksh-20120801/src/cmd/ksh93/edit/edit.c.kshmfix 2013-09-23 10:46:57.007256192 +0200
++++ ksh-20120801/src/cmd/ksh93/edit/edit.c 2013-09-23 10:47:43.988937610 +0200
+@@ -1050,7 +1050,7 @@ int ed_getchar(register Edit_t *ep,int m
+ {
+ if(mode<=0 && -c == ep->e_intr)
+ {
+- sh_fault(SIGINT);
++ killpg(getpgrp(),SIGINT);
+ siglongjmp(ep->e_env, UINTR);
+ }
+ if(mode<=0 && ep->sh->st.trap[SH_KEYTRAP])
+