bash appears to have bug in the handling of the last line in a script. If the last line invokes an executable, the script exits with bad return value regardless of the return value of the executable. to invoke, create two files, foo: ---------cut here--------- #a script /bin/echo hithere ---------cut here--------- bar: ---------cut here--------- #a script /bin/echo hithere ---------cut here--------- then from a shell run bash -c ". foo; echo done" bash -c ". bar; echo done" In the first case you will get hithere In the second case you will get hithere done bash2, zsh, etc., will always give you the second case. b.c.
Fixed in rawhide