Timeline for timeout without killing process in bash
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 31, 2013 at 7:43 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 | fixes and improvements courtesy of Stephane Chazelas: run sleep in a separate process group; make sure the fifo is private to the user; note about the portabiliy of mktemp |
| Jul 31, 2013 at 6:11 | comment | added | Stéphane Chazelas | As a note (probably not an issue to the OP), asynchronous processes have their stdin redirected from /dev/null. | |
| Jul 31, 2013 at 6:07 | comment | added | Stéphane Chazelas | You may want to set the umask to 077 to avoid someone interfering with your fifo. | |
| Jul 31, 2013 at 6:01 | comment | added | Stéphane Chazelas | With bash, you need quotes around variables in redirected files as well (> "$fifo") | |
| Jul 31, 2013 at 6:00 | comment | added | Stéphane Chazelas | pgids are created only in interactive shells. In scripts, you'd need set -m. | |
| Jul 31, 2013 at 6:00 | comment | added | Stéphane Chazelas | That mktemp invocation is not portable (won't work on BSDs for instance where you need to specify the template) | |
| Jul 31, 2013 at 0:56 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |