Hello community,

here is the log from the commit of package zsh for openSUSE:Factory
checked in at Mon Jun 20 11:00:54 CEST 2011.



--------
--- zsh/zsh.changes     2011-06-01 15:36:23.000000000 +0200
+++ /mounts/work_src_done/STABLE/zsh/zsh.changes        2011-06-17 
15:42:26.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Jun 17 13:35:56 UTC 2011 - [email protected]
+
+- Add zsh-kill-suspended-job.patch: fix killing suspended jobs 
+- Add zsh-findproc.patch: fix findproc() to find stopped jobs
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  zsh-findproc.patch
  zsh-kill-suspended-job.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zsh.spec ++++++
--- /var/tmp/diff_new_pack.kBUxNd/_old  2011-06-20 10:59:03.000000000 +0200
+++ /var/tmp/diff_new_pack.kBUxNd/_new  2011-06-20 10:59:03.000000000 +0200
@@ -19,7 +19,7 @@
 
 Name:           zsh
 Version:        4.3.12
-Release:        1
+Release:        2
 License:        BSD
 Summary:        Shell with comprehensive completion
 Url:            http://www.zsh.org
@@ -29,6 +29,11 @@
 Source2:        zshenv
 Source3:        zprofile
 Patch1:         %{name}-%{version}-disable-c02cond-test.patch
+# PATCH-FIX-UPSTREAM zsh-findproc.patch [email protected] -- Upstream commit 
21c39600ef2d74c3e7474c4e5b89805656c6fe4e
+Patch2:         %{name}-findproc.patch
+# PATCH-FIX-UPSTREAM zsh-kill-suspended-job.patch [email protected] -- Upstream 
commit 98b29d02ca17068779f4b8fa2d43c9753386478f 
+Patch3:         %{name}-kill-suspended-job.patch
+
 BuildRequires:  fdupes
 BuildRequires:  libcap-devel
 BuildRequires:  ncurses-devel
@@ -47,6 +52,8 @@
 %prep
 %setup -q
 %patch1
+%patch2 -p1
+%patch3 -p1
 
 # Fix bindir path in some files
 perl -p -i -e 's|/usr/local/bin|%{_bindir}|' \

++++++ zsh-findproc.patch ++++++
commit 21c39600ef2d74c3e7474c4e5b89805656c6fe4e
Author: Bart Schaefer <[email protected]>
Date:   Sun Jun 12 15:06:37 2011 +0000

    29472: findproc() needs at least to also return     stopped jobs.

diff --git a/Src/jobs.c b/Src/jobs.c
index b3ec000..0ace80b 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -189,7 +189,8 @@ findproc(pid_t pid, Job *jptr, Process *pptr, int aux)
             * the termination of the process which pid we were supposed
             * to return in a different job.
             */
-           if (pn->pid == pid && pn->status == SP_RUNNING) {
+           if (pn->pid == pid && (pn->status == SP_RUNNING ||
+                                  WIFSTOPPED(pn->status))) {
                *pptr = pn;
                *jptr = jobtab + i;
                return 1;
++++++ zsh-kill-suspended-job.patch ++++++
commit 98b29d02ca17068779f4b8fa2d43c9753386478f
Author: Bart Schaefer <[email protected]>
Date:   Wed Jun 15 15:38:14 2011 +0000

    29481: always return a matching job in findproc() but scan the whole list
    to prefer running jobs

diff --git a/Src/jobs.c b/Src/jobs.c
index 0ace80b..9c9b12f 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -160,6 +160,8 @@ findproc(pid_t pid, Job *jptr, Process *pptr, int aux)
     Process pn;
     int i;
 
+    *jptr = NULL;
+    *pptr = NULL;
     for (i = 1; i <= maxjob; i++)
     {
        /*
@@ -189,16 +191,16 @@ findproc(pid_t pid, Job *jptr, Process *pptr, int aux)
             * the termination of the process which pid we were supposed
             * to return in a different job.
             */
-           if (pn->pid == pid && (pn->status == SP_RUNNING ||
-                                  WIFSTOPPED(pn->status))) {
+           if (pn->pid == pid) {
                *pptr = pn;
                *jptr = jobtab + i;
-               return 1;
+               if (pn->status == SP_RUNNING) 
+                   return 1;
            }
        }
     }
 
-    return 0;
+    return (*pptr && *jptr);
 }
 
 /* Does the given job number have any processes? */
diff --git a/Src/signals.c b/Src/signals.c
index 456a853..a848acd 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -489,7 +489,6 @@ wait_for_processes(void)
         * Find the process and job containing this pid and
         * update it.
         */
-       pn = NULL;
        if (findproc(pid, &jn, &pn, 0)) {
 #if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
            struct timezone dummy_tz;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to