Subject: /bin/sh problem with -e flag?
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Andrew Cagney <cagney@highland.oz.au>
List: current-users
Date: 06/03/1994 17:37:03
Hi,

Should a shell variable assignment succeeed?

	$ /bin/sh -c 'false ; C= ; echo $?'
	1
vs
	$ /usr/local/bin/bash -c 'false ; C= ; echo $?
	0

When building gcc-2.5.8, the problem is encountered as make runs sh as:

	/bin/sh -ce '...'

and since `C=' fails, that action fails with it.


Two questions:

	1.	What is the correct behavour
	2.	If this is a bug in ASH, is there a fix?


				regards Andrew

------------------------------------------------------------------------------