Re: [gentoo-user] OT: bash scripting: implement uninterruptable sleep

2006-03-31 Thread Sascha Lucas
Hi, On Tue, 28 Mar 2006, Richard Fish wrote: On 3/28/06, Sascha Lucas [EMAIL PROTECTED] wrote: I have a shell script and want a uninterruptable sleep. /usr/bin/sleep itself seems to have its own signal handlers. How is it possible to sleep uninterruptable? trap echo 'Ctrl+C should not work'

[gentoo-user] OT: bash scripting: implement uninterruptable sleep

2006-03-28 Thread Sascha Lucas
Hi List, I have a shell script and want a uninterruptable sleep. /usr/bin/sleep itself seems to have its own signal handlers. How is it possible to sleep uninterruptable? #!/bin/bash trap echo 'Ctrl+C should not work' INT for foo in 1 2 3; do echo $foo sleep 10 done ## end

Re: [gentoo-user] OT: bash scripting: implement uninterruptable sleep

2006-03-28 Thread Richard Fish
On 3/28/06, Sascha Lucas [EMAIL PROTECTED] wrote: Hi List, I have a shell script and want a uninterruptable sleep. /usr/bin/sleep itself seems to have its own signal handlers. How is it possible to sleep uninterruptable? trap echo 'Ctrl+C should not work' INT now=`date +%s` expires=$(( $now