--- crash/cmdline.c.orig
+++ crash/cmdline.c
@@ -757,8 +757,12 @@ retry:
                                         p_pid = strtok(NULL, " ");
                                         pgrp = strtok(NULL, " ");
 				        if (STREQ(name, "(sh)") &&
-					    (atoi(p_pid) == getpid())) 
-						pc->pipe_shell_pid = atoi(pid);
+					    (atoi(p_pid) == getpid())) { 
+						if (retries && STREQ(status, "Z"))
+							pc->pipe_shell_pid = 0;
+						else
+							pc->pipe_shell_pid = atoi(pid);
+					}
                                         if (STREQ(name, lookfor) &&
                                             ((atoi(p_pid) == getpid()) ||
 				             (atoi(p_pid) == pc->pipe_shell_pid)
