Subject: Re: bin/17870: /bin/sh bug on expanding $? in here-documents
To: None <netbsd-bugs@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 08/08/2002 10:30:56
> I think the correct solution is to move the 'oexitstatus = exitstatus'
> from inside the loop in expredir() to before each call to it.
> (Except the one in evalcommand - where it is already set.)

Note that this doesn't fix:

    ! :
    for f in $? `echo $?` $? `echo $?`
    do
	    echo $?
    done

Even if you move the 'oexitstatus = exitstatus' outside of the
loop in 'evalfor'.

	David

-- 
David Laight: david@l8s.co.uk