help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] detecting fork error


From: Chet Ramey
Subject: Re: [Help-bash] detecting fork error
Date: Fri, 13 Jul 2012 09:44:51 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 7/13/12 6:46 AM, John Kearney wrote:
> what is the best way to detect a fork error
> 
> is this the best way or is there something better?
> sleep 4 &
> if [ $? -ne 0 ]; then
>     echo "Fork Error $?"
> fi

The shell tries hard to return 126 in this case.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]