public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] OT: bash scripting: implement uninterruptable sleep
@ 2006-03-28  8:13 Sascha Lucas
  2006-03-28 21:41 ` Richard Fish
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Lucas @ 2006-03-28  8:13 UTC (permalink / raw
  To: gentoo-user

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 of script

TIA,

Sascha.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-31  9:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28  8:13 [gentoo-user] OT: bash scripting: implement uninterruptable sleep Sascha Lucas
2006-03-28 21:41 ` Richard Fish
2006-03-31  9:06   ` Sascha Lucas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox