Skip to contentSkip to conversation

bug with $? after .

DISCUSSION Eric Blake 2 participants 3 messages Jul 10, 2009 – Aug 31, 2009

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

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.

Signature · 1 line
Eric Blake
author
#1 lore raw

According to Eric Blake on 7/9/2009 3:09 PM:

Quoted 7 lines

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.

Signature · 3 lines
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
#2 lore raw
In reply to Eric Blake
Quoted 7 lines · Eric Blake

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,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt