From owner-FreeBSD-users-jp@jp.freebsd.org  Mon Jul  9 17:35:14 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id RAA41927;
	Mon, 9 Jul 2001 17:35:14 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from shiva.tri.asanuma.co.jp (shiva.tri.asanuma.co.jp [210.160.188.2])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id RAA41920
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Mon, 9 Jul 2001 17:35:12 +0900 (JST)
	(envelope-from mori@tri.asanuma.co.jp)
Received: from yashoda.tri.asanuma.co.jp (yashoda.tri.asanuma.co.jp [172.16.57.11])
	by shiva.tri.asanuma.co.jp (Postfix) with ESMTP id 00975542B
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Mon,  9 Jul 2001 17:35:06 +0900 (JST)
Received: from kurishna.tri.asanuma.co.jp (kurishna.tri.asanuma.co.jp [172.16.57.2])
	by yashoda.tri.asanuma.co.jp (8.11.0/8.11.0) with ESMTP id f698Z5x19401
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Mon, 9 Jul 2001 17:35:06 +0900 (JST)
To: FreeBSD-users-jp@jp.FreeBSD.org
References: <owith69pzm.fsf@wish.box2.kmc.kyoto-u.ac.jp>
	<20010707.005158.41705227.hrs@eos.ocn.ne.jp>
	<200107061708.f66H8Pb93101.toshi@jp.FreeBSD.org>
	<ow1yntagzj.fsf@wish.box2.kmc.kyoto-u.ac.jp>
	<200107080323.f683NKV20461.toshi@jp.FreeBSD.org>
	<200107080750.f687owS20981.toshi@jp.FreeBSD.org>
Siganture-File: ~/.signature
MIME-Version: 1.0 (generated by REMI 1.14.2 - =?ISO-8859-4?Q?=22Hokuhoku-=D2?=
 =?ISO-8859-4?Q?shima=22?=)
Content-Type: text/plain; charset=ISO-2022-JP
From: Mori Kouji <mori@tri.asanuma.co.jp>
Date: 09 Jul 2001 17:35:05 +0900
In-Reply-To: <200107080750.f687owS20981.toshi@jp.FreeBSD.org> (Toshihiko ARAI's message of "Sun, 8 Jul 2001 16:50:58 +0900 (JST)")
Message-ID: <80lmlypkjq.fsf_-_@kurishna.tri.asanuma.co.jp>
Lines: 36
User-Agent: Nana-gnus/7.1.0.23 REMI/1.14.2 (=?ISO-8859-4?Q?Hokuhoku-=D2shi?=
 =?ISO-8859-4?Q?ma?=) Chao/1.14.1 (=?ISO-8859-4?Q?Rokujiz=F2?=) APEL/10.3
 Emacs/21.0.103 (i386--freebsd) MULE/5.0 (SAKAKI)
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: FreeBSD-users-jp 62834
Subject: [FreeBSD-users-jp 62834] behavior of sh with -e option (Re: GNU make
 =?ISO-2022-JP?B?GyRCJEgbKEI=?=
 make =?ISO-2022-JP?B?GyRCJEc1c0YwJCwwYyQmGyhC?= script)
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org
X-Originator: mori@kurishna.tri.asanuma.co.jp

$B?9$G$9!#(B

Toshihiko ARAI <toshi@jp.freebsd.org> writes:

> >> $BB>$N(B shell $B$G<B83$7$?$H$3$m!"(BSolaris7 $B$N(B /bin/sh $B$d(B bash 2.04
> >> $B$G$O:G8e$NNc$b(B exit status 0 $B$G=*N;$7$^$9!#(B
> >> pdksh $B$d(B OpenBSD $B$N(B /bin/sh $B$G$O(B FreeBSD $B$N(B /bin/sh $B$HF1$8$/(B
> >> exit status 1 $B$K$J$j$^$7$?!#(B
> 
> $B$H$$$&$3$H$G!"A08@E12s!#(B
> FreeBSD $B$N(B /bin/sh $B$,4V0c$C$F$k!#$K0lI<!#(B
> $B!t$&!<$s!"$A$g$C$HLdBjB?$$%7%'%k$@$J$!!D(B

$B0J2<$N$h$&$J=$@5$G$I$&$G$7$g$&$+(B?  $BC/$+%A%'%C%/$7$F$_$F!#(B

Index: eval.c
===================================================================
RCS file: /cvs/FreeBSD/src/bin/sh/eval.c,v
retrieving revision 1.27.2.2
diff -u -u -r1.27.2.2 eval.c
--- eval.c	2001/03/05 11:05:48	1.27.2.2
+++ eval.c	2001/07/09 08:06:36
@@ -283,7 +283,7 @@
 	 * the conditional here.
 	 */
 	if ((flags & EV_EXIT) || (eflag && exitstatus 
-	    && !(flags & EV_TESTED) && !(n->type == NSEMI)))
+	    && !(flags & EV_TESTED) && (n->type == NCMD)))
 		exitshell(exitstatus);
 }
 

-- 
$B?9(B $B9@Fs(B	(MORI Kouji)
($B3t(B)$B^I>BAH(B $B5;=Q8&5f=j(B
E-mail: mori@tri.asanuma.co.jp
