Cover V12, I01

Article
Figure 1
Figure 2
Figure 3
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Listing 6
Sidebar
Table 1

jan2003.tar

Listing 6 .bash_logout

#####################################################################
# File Name: .bash_logout
# Location: Cygwin user's home directory
# Purpose: This file is sourced when a Cygwin bash shell exit
#####################################################################
# Check to see if we're running under Cygwin.
if uname -s | fgrep -q CYGWIN
then
unset REPLY
# Prompt the user for input, with a 5-second timeout.
read -t5 -n1 -p "Stop keychain? [y/N] "
# If user does not stop keychain, display an error message that will
# remain on-screen if the Cygwin window hangs.
if [ "$(echo $REPLY | tr Y y)" == "y" ]; then
    echo
    keychain --stop
    sleep 1
else
    echo
    echo "This window may hang under Cygwin if ssh-agent was initally"
    echo "run from this tty [$(tty)] and is still running. Either"
    echo -n "close the window manually, or kill ssh-agent process "
    echo "$(ps | fgrep ssh-agent | awk '{print $1}')"
    echo "from another Cygwin window."
fi
fi