Information:
========

GNU sh-utils 2.0
Machine: i386
OS: RedHat 6.1 linux
Compiler: gcc 3.77
bash version: 1.14
patch level: 7

Description:
=========

When log in as root and execute:

su - username -c "exit 2"; echo $?

the result is 0, not 2. Apparently, the su command does not propagate the
return code from executing a command to the invoking shell. In ksh of HP-UX,
the su does. I'm not sure it is a bug or not since both the man page and
info page of su do not mention about return code.

Thanks a lot,

Dong Le,


Reply via email to