34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
--- ksh-20070328/src/cmd/ksh93/sh/jobs.c.exit19 2007-05-22 11:51:10.000000000 +0200
|
|
+++ ksh-20070328/src/cmd/ksh93/sh/jobs.c 2007-05-22 11:55:55.000000000 +0200
|
|
@@ -307,7 +307,8 @@
|
|
else
|
|
{
|
|
pw->p_flag |= (P_DONE|P_NOTIFY);
|
|
- if(WEXITSTATUS(wstat) > pw->p_exit)
|
|
+ pw->p_exit = pw->p_exitmin;
|
|
+ if(WEXITSTATUS(wstat) > pw->p_exitmin)
|
|
pw->p_exit = WEXITSTATUS(wstat);
|
|
}
|
|
if(pw->p_pgrp==0)
|
|
@@ -1068,8 +1069,8 @@
|
|
pw->p_env = sh.curenv;
|
|
pw->p_pid = pid;
|
|
pw->p_flag = P_EXITSAVE;
|
|
- pw->p_exit = sh.xargexit;
|
|
- sh.xargexit = 0;
|
|
+ pw->p_exitmin = sh.xargexit;
|
|
+ pw->p_exit = 0;
|
|
if(sh_isstate(SH_MONITOR))
|
|
{
|
|
if(killpg(job.curpgid,0)<0 && errno==ESRCH)
|
|
--- ksh-20070328/src/cmd/ksh93/include/jobs.h.exit19 2007-05-22 11:51:29.000000000 +0200
|
|
+++ ksh-20070328/src/cmd/ksh93/include/jobs.h 2007-05-22 11:52:14.000000000 +0200
|
|
@@ -64,6 +64,7 @@
|
|
pid_t p_fgrp; /* process group when stopped */
|
|
short p_job; /* job number of process */
|
|
unsigned short p_exit; /* exit value or signal number */
|
|
+ unsigned short p_exitmin; /* minimum exit value for xargs */
|
|
unsigned char p_flag; /* flags - see below */
|
|
int p_env; /* subshell environment number */
|
|
#ifdef JOBS
|