diff options
| author | Jonathan Nieder <jrnieder@gmail.com> | 2011-03-10 21:23:11 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-03-10 21:23:11 +0800 |
| commit | 8213431d222b56316e225a1f308b62a72fbb1faa (patch) | |
| tree | 303808ccc3ab85a23f38a4920228fd35f794d6da /ChangeLog | |
| parent | [BUILTIN] Fix CTLESC clobbering by read(1) (diff) | |
| download | dash-8213431d222b56316e225a1f308b62a72fbb1faa.tar.gz dash-8213431d222b56316e225a1f308b62a72fbb1faa.zip | |
[BUILTIN] Dotcmd should exit with zero when doing nothing
Tim Allen wrote:
> The POSIX specification for the dot command[1] states:
>
> EXIT STATUS
> Returns the value of the last command executed, or a zero exit
> status if no command is executed.
>
> If an empty file is sourced, then "no command is executed"
I agree. Looking through "git log --patch src/main.c", though, I find
v0.5.3~42 (Do not clobber exit status in dotcmd., 2005-03-03), which
appears to have been meant to take care of the following case:
$ cat printstatus.sh
echo $?
$ false
$ . ./printstatus.sh
1
I wonder if the following on top might help (imitating evalcmd)?
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'ChangeLog')
| -rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 6d02fa9..8a832bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-10 Jonathan Nieder <jrnieder@gmail.com> + + * Dotcmd should exit with zero when doing nothing. + 2011-03-10 Herbert Xu <herbert@gondor.apana.org.au> * Fix CTLESC clobbering by read(1). |