Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2013 10:00:01 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/181435: commit references a PR
Message-ID:  <201308241000.r7OA01wn035763@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/181435; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/181435: commit references a PR
Date: Sat, 24 Aug 2013 09:57:45 +0000 (UTC)

 Author: jilles
 Date: Sat Aug 24 09:57:32 2013
 New Revision: 254767
 URL: http://svnweb.freebsd.org/changeset/base/254767
 
 Log:
   sh: Do not prematurely discard stopped jobs in a wait builtin.
   
   If a job is specified to 'wait', wait for it to complete. Formerly, in
   interactive mode, the job was deleted if it stopped.
   
   If no jobs are specified in interactive mode, 'wait' still waits for all jobs
   to complete or stop.
   
   In non-interactive mode, WUNTRACED is not passed to wait3() so stopped jobs
   are not detected.
   
   PR:		bin/181435
 
 Modified:
   head/bin/sh/jobs.c
 
 Modified: head/bin/sh/jobs.c
 ==============================================================================
 --- head/bin/sh/jobs.c	Sat Aug 24 09:42:14 2013	(r254766)
 +++ head/bin/sh/jobs.c	Sat Aug 24 09:57:32 2013	(r254767)
 @@ -495,14 +495,10 @@ waitcmdloop(struct job *job)
  	in_waitcmd++;
  	do {
  		if (job != NULL) {
 -			if (job->state) {
 +			if (job->state == JOBDONE) {
  				status = job->ps[job->nprocs - 1].status;
  				if (WIFEXITED(status))
  					retval = WEXITSTATUS(status);
 -#if JOBS
 -				else if (WIFSTOPPED(status))
 -					retval = WSTOPSIG(status) + 128;
 -#endif
  				else
  					retval = WTERMSIG(status) + 128;
  				if (! iflag || ! job->changed)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308241000.r7OA01wn035763>