-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can anyone explain this:

% sh -ec 'f() { return 5 ; } ; if f ; then echo tt ; else echo ff ; fi'
ff
% sh -ec 'f() { return 5 ; : ; } ; if f ; then echo tt ; else echo ff ; fi'
% echo $?
5

If any commands appear after the return statement in a function,
then -e flag triggers untested command failure although function call is
tested with `if' statement.

-----BEGIN PGP SIGNATURE-----

iD8DBQFCvmbWFw6SP/bBpCARAo2GAJ9DT0FeeUEbweidCklxj8V8uEeXHQCgmNd7
pT2zbB8UF9TClhRUWpyZyf4=
=Alpo
-----END PGP SIGNATURE-----
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to