config root man

Current Path : /compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/usr/share/doc/bash-3.2/functions/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/usr/share/doc/bash-3.2/functions/exitstat

# Contributed by Noah Friedman and Roland McGrath.

# To be run by the PROMPT_COMMAND variable, so that one can see what
# the exit status of processes are.

function check_exit_status ()
{
 local status="$?"
 local signal=""

    if [ ${status} -ne 0 ] && [ ${status} != 128 ]; then
       # If process exited by a signal, determine name of signal.
       if [ ${status} -gt 128 ]; then
          signal="$(builtin kill -l $((${status} - 128)) 2>/dev/null)"
	  if [ "$signal" ]; then signal="($signal)"; fi
       fi
       echo "[Exit ${status} ${signal}]" 1>&2
    fi
    return 0
}

PROMPT_COMMAND=check_exit_status

Man Man