Re: sleep builtin

2020-04-06 Thread Thorsten Glaser
Salve Noctambule,

>I have a question about sleep builtin. I'm writing a script and at the
>end, I want it to simply wait for SIGINT (from user) or signals with
>kill builtin.

The normal way to terminate sleep is SIGALRM though, but SIGINT
will most likely also work (try it out).

>What is the maximum number of seconds that can be used with sleep ?

This depends on your operating environment, specifically
the fifth argument to the select(2) syscall.

bye,
//mirabilos
-- 
“It is inappropriate to require that a time represented as
 seconds since the Epoch precisely represent the number of
 seconds between the referenced time and the Epoch.”
-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2


sleep builtin

2020-04-06 Thread Noctambule
Hey !

I have a question about sleep builtin. I'm writing a script and at the end, I 
want it to simply wait for SIGINT (from user) or signals with kill builtin.

What is the maximum number of seconds that can be used with sleep ?

I was thinking about adding the following "trick" :

while true; do sleep 86400; done

Thanks for you help.

Kind regards