Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
On 1/28/13 11:11 AM, Mart Frauenlob wrote:
> On 28.01.2013 16:59, Chet Ramey wrote:
>> On 1/28/13 8:32 AM, Greg Wooledge wrote:
>>
>>> Well, any of the ways of testing the exit status should suffice.
>>> Also note that you can't distinguish a failure-due-to-timeout from
>>> other kinds of failures.
>>
>> Not quite true. The manual says:
>>
>> "The exit status is greater than 128 if the timeout is exceeded."
>>
>> That does narrow the error space.
>
> I observed an exit status of 142 if I remember correctly.
That's 128+SIGALRM (14).
> Is that consistent over bash versions 3+ ?
I put it in explicitly in bash-4.0.
> Could I rely on that for catching the evidence of timeout?
I don't plan on changing that, but SIGALRM does have different values on
different systems, so it all depends on just how portable you want your
shell code to be.
Chet
--
``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/