Possible bug: Race condition when calling external commands during trap handling

2012-05-03 Thread Tillmann.Crueger
Yes, you are correct, that line is buggy and contains a typo. I added it later in a hurry after I could reproduce the error, to ensure a clean shutdown of the script. What I meant to type was: > trap "kill $!; exit 0" INT TERM However thinking about it, this also does not work as intended. The

Possible bug: Race condition when calling external commands during trap handling

2012-05-02 Thread Tillmann.Crueger
Hi, I have a problem with a trap handler in a script, which is doing some logging and needs external commands (date and hostname). In some cases there seems to be a race condition causing a syntax error every once in a while. I am assuming it is a race condition, because the syntax errors only