[ksh/f14] do not crash when killing last bg job when there is not any ksh updated to 2011-06-30
Michal Hlavinka
mhlavink at fedoraproject.org
Fri Aug 12 11:30:22 UTC 2011
commit 28cd2ab524ad9bd236d8355a0642f0baa15c7a8c
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Fri Aug 12 13:30:08 2011 +0200
do not crash when killing last bg job when there is not any
ksh updated to 2011-06-30
.gitignore | 40 ++++++++++++++++++++++++++++++++++++++--
ksh-20110630-fixkill.patch | 20 ++++++++++++++++++++
ksh.spec | 28 +++++++++++++++++-----------
sources | 4 ++--
4 files changed, 77 insertions(+), 15 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 730f2c0..78b75b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,38 @@
-ast-ksh.2011-05-05.tgz
-INIT.2011-05-05.tgz
+ast-ksh.2010-07-01.tgz
+INIT.2010-07-01.tgz
+/ast-ksh.2010-08-11.tgz
+/INIT.2010-08-11.tgz
+/ast-ksh.2010-08-26.tgz
+/INIT.2010-08-26.tgz
+/ast-ksh.2010-09-24.tgz
+/INIT.2010-09-24.tgz
+/ast-ksh.2010-10-10.tgz
+/INIT.2010-10-10.tgz
+/ast-ksh.2010-10-26.tgz
+/INIT.2010-10-26.tgz
+/ast-ksh.2010-11-22.tgz
+/INIT.2010-11-22.tgz
+/ast-ksh.2010-12-01.tgz
+/INIT.2010-12-01.tgz
+/ast-ksh.2010-12-12.tgz
+/INIT.2010-12-12.tgz
+/ast-ksh.2011-01-04.tgz
+/INIT.2011-01-04.tgz
+/ast-ksh.2011-01-18.tgz
+/INIT.2011-01-18.tgz
+/ast-ksh.2011-01-27.tgz
+/INIT.2011-01-27.tgz
+/ast-ksh.2011-01-31.tgz
+/INIT.2011-01-31.tgz
+/ast-ksh.2011-02-02.tgz
+/INIT.2011-02-02.tgz
+/ast-ksh.2011-02-08.tgz
+/INIT.2011-02-08.tgz
+/ast-ksh.2011-04-15.tgz
+/INIT.2011-04-15.tgz
+/ast-ksh.2011-04-28.tgz
+/INIT.2011-04-28.tgz
+/ast-ksh.2011-05-05.tgz
+/INIT.2011-05-05.tgz
+/ast-ksh.2011-06-30.tgz
+/INIT.2011-06-30.tgz
diff --git a/ksh-20110630-fixkill.patch b/ksh-20110630-fixkill.patch
new file mode 100644
index 0000000..c027bac
--- /dev/null
+++ b/ksh-20110630-fixkill.patch
@@ -0,0 +1,20 @@
+diff -up ksh-20110630/src/cmd/ksh93/sh/jobs.c.orig ksh-20110630/src/cmd/ksh93/sh/jobs.c
+--- ksh-20110630/src/cmd/ksh93/sh/jobs.c.orig 2011-08-12 11:50:39.059283656 +0200
++++ ksh-20110630/src/cmd/ksh93/sh/jobs.c 2011-08-12 11:52:02.237911639 +0200
+@@ -1103,7 +1103,7 @@ static struct process *job_bystring(regi
+
+ int job_kill(register struct process *pw,register int sig)
+ {
+- Shell_t *shp = pw->p_shp;
++ Shell_t *shp;
+ register pid_t pid;
+ register int r;
+ const char *msg;
+@@ -1116,6 +1116,7 @@ int job_kill(register struct process *pw
+ errno = ECHILD;
+ if(pw==0)
+ goto error;
++ shp = pw->p_shp;
+ pid = pw->p_pid;
+ #if SHOPT_COSHELL
+ if(pw->p_cojob)
diff --git a/ksh.spec b/ksh.spec
index 601d6d3..e99137d 100644
--- a/ksh.spec
+++ b/ksh.spec
@@ -1,12 +1,12 @@
-%global releasedate 2011-05-05
+%global releasedate 2011-06-30
Name: ksh
Summary: The Original ATT Korn Shell
URL: http://www.kornshell.com/
Group: System Environment/Shells
License: CPL
-Version: 20110505
-Release: 3%{?dist}
+Version: 20110630
+Release: 1%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source3: kshrc.rhs
@@ -20,10 +20,11 @@ Patch1: ksh-20070328-builtins.patch
#fix regression test suite to be usable during packagebuild - Fedora/RHEL specific
Patch2: ksh-20100826-fixregr.patch
-Patch3: ksh-20110505-resume.patch
-
# for ksh < 2011-08-03
-Patch4: ksh-20110630-ifsfix.patch
+Patch3: ksh-20110630-ifsfix.patch
+
+# sent upstream, for ksh <= 2011-08-12
+Patch4: ksh-20110630-fixkill.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: pdksh
@@ -45,8 +46,8 @@ with "sh" (the Bourne Shell).
%setup -q -T -D -a 1
%patch1 -p1 -b .builtins
%patch2 -p1 -b .fixregr
-%patch3 -p1 -b .resume
-%patch4 -p1 -b .fixifs
+%patch3 -p1 -b .ifsfix
+%patch4 -p1 -b .fixkill
#/dev/fd test does not work because of mock
sed -i 's|ls /dev/fd|ls /proc/self/fd|' src/cmd/ksh93/features/options
@@ -59,7 +60,8 @@ export CCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CC=gcc
./bin/package "make"
-cp lib/package/LICENSES/ast LICENSE
+#missing in latest tarball
+#cp lib/package/LICENSES/ast LICENSE
%install
rm -rf $RPM_BUILD_ROOT
@@ -114,7 +116,8 @@ fi
%files
%defattr(-, root, root,-)
-%doc README LICENSE
+# LICENSE missing in latest tarball
+%doc README
/bin/ksh
/usr/bin/shcomp
%{_mandir}/man1/*
@@ -125,6 +128,10 @@ fi
rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Aug 12 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110630-1
+- do not crash when killing last bg job when there is not any
+- ksh updated to 2011-06-30
+
* Wed Aug 03 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110505-3
- fix: IFS manipulation in a function can cause crash
@@ -143,7 +150,6 @@ fi
* Wed Feb 09 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110208-1
- ksh updated to 2011-02-08
-- ksh updated to 2011-02-08
* Fri Feb 04 2011 Michal Hlavinka <mhlavink at redhat.com> - 20110202-1
- ksh updated to 2011-02-02
diff --git a/sources b/sources
index b74ae7f..a034c80 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-66017586210d33bc45641bb4f63c9325 ast-ksh.2011-05-05.tgz
-438bbad8d15f408f9e1eeba8cb530d50 INIT.2011-05-05.tgz
+5f07713ecdb7dc2caa1def00672b308a ast-ksh.2011-06-30.tgz
+de7e347b8e33130daad338a1e29112ff INIT.2011-06-30.tgz
More information about the scm-commits
mailing list