DASH Shell discussions
 help / color / mirror / Atom feed
* bug with $? after .
@ 2009-07-09 21:09 Eric Blake
  2009-08-31 11:28 ` Eric Blake
  2009-08-31 11:51 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Blake @ 2009-07-09 21:09 UTC (permalink / raw)
  To: dash

According to POSIX, the status of . shall be 0 if no command was executed during
the sourced script.  Therefore, this is a bug:

$ dash -c 'false; . /dev/null; echo $?'
1

and should be fixed to output 0.

-- 
Eric Blake



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug with $? after .
  2009-07-09 21:09 bug with $? after Eric Blake
@ 2009-08-31 11:28 ` Eric Blake
  2009-08-31 11:51 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2009-08-31 11:28 UTC (permalink / raw)
  To: dash

According to Eric Blake on 7/9/2009 3:09 PM:
> According to POSIX, the status of . shall be 0 if no command was executed during
> the sourced script.  Therefore, this is a bug:
> 
> $ dash -c 'false; . /dev/null; echo $?'
> 1
> 
> and should be fixed to output 0.

Ping.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: bug with $? after .
  2009-07-09 21:09 bug with $? after Eric Blake
  2009-08-31 11:28 ` Eric Blake
@ 2009-08-31 11:51 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2009-08-31 11:51 UTC (permalink / raw)
  To: Eric Blake; +Cc: dash

On Thu, Jul 09, 2009 at 09:09:11PM +0000, Eric Blake wrote:
> According to POSIX, the status of . shall be 0 if no command was executed during
> the sourced script.  Therefore, this is a bug:
> 
> $ dash -c 'false; . /dev/null; echo $?'
> 1
> 
> and should be fixed to output 0.

It's on my todo list.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-31 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 21:09 bug with $? after Eric Blake
2009-08-31 11:28 ` Eric Blake
2009-08-31 11:51 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox