I've got a script that worked fine in GNU bash, version 1.14.7(1) (RedHat
Linux 6.1), but on GNU bash, version 2.04.3(1)-release
(i586-mandrake-linux-gnu) the script spews this out unexpectedly in the
middle of the script:

[1]+  Terminated              ( trap 0 1 2 15; while true; do
    sleep 10; echo ""; echo "Hmm, something seems to be hung, check your
modem e
h?";
done )

The script at that point goes as follows:
# =====================
    (trap 0 1 2 15;
     while true; do
        sleep 10;
        echo ""
        echo "Hmm, something seems to be hung, check your modem eh?"
     done)& nagpid=$!
    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; kill $nagpid \$catpid; exit 1" 0
1 2 15
    SendToModem "AT+FCLASS=?"                   # ask for class support

    kill $nagpid
    trap "$RMCMD \$JUNK; $RMCMD -r $TMPDIR; test \"\$catpid\" && kill
\$catpid; exit 1" 0 1 2 15
    sleep 1

    RESULT=`tr -ds '\015' '\012' < $OUT | tail -1`
    if [ -z "$RESPONSE" ]; then
        echo ""
        echo "There was no response from the modem.  Perhaps the modem is"
        echo "turned off or the cable between the modem and host is not"
        echo "connected.  Please check the modem and hit a carriage return"
        prompt "when you are ready to try again:"
        read x
    fi
# =====================
The spewing occurs at the time of execution of the line reading: 'kill
$nagpid'.  Even if I rewrite that line as 'kill $nagpid >/dev/null 2>&1' the
spewing still occurs.  If I comment out the line, then the spewing doesn't
occur, but I get errors because the process is running when it shouldn't be.
This did not happen at all in the earlier bash version.  What has changed in
bash, and what do I need to do to stop the spewing from appearing on the
screen?

I've tried this on a few different distributions (RedHat, Mandrake and
Slackware), and the spewing always happens when the bash version is 2.04 and
not 1.14.  I've read through 'man bash' quite thoroughly, and can't seem to
find anything.  The bash FAQ doesn't help much, either.

Any help would be appreciated...
Thanks.

Lee Howard




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to