From: | Sascha Lucas <sascha.lucas@×××××××××××××××××.de> |
---|---|
To: | gentoo-user@l.g.o |
Subject: | [gentoo-user] OT: bash scripting: implement uninterruptable sleep |
Date: | Tue, 28 Mar 2006 08:37:05 |
Message-Id: | Pine.LNX.4.64.0603281004080.30414@tragbb.ehf.hav-fghggtneg.qr |
1 | Hi List, |
2 | |
3 | I have a shell script and want a uninterruptable sleep. /usr/bin/sleep |
4 | itself seems to have its own signal handlers. How is it possible to sleep |
5 | uninterruptable? |
6 | |
7 | #!/bin/bash |
8 | trap "echo 'Ctrl+C should not work'" INT |
9 | |
10 | for foo in 1 2 3; do |
11 | echo $foo |
12 | sleep 10 |
13 | done |
14 | ## end of script |
15 | |
16 | TIA, |
17 | |
18 | Sascha. |
19 | -- |
20 | gentoo-user@g.o mailing list |
Subject | Author |
---|---|
Re: [gentoo-user] OT: bash scripting: implement uninterruptable sleep | Richard Fish <bigfish@××××××××××.org> |