Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Deadlock when receiving kill-signal from child process



I can't seem to produce wanted gdb output of the frozen state. If i
run through gdb with "continue&", when it finally freezes, gdb will
only tell me that it is still running and trying to perform operations
gives "Target is executing.". My gdb-foo is way too low to deal with
this (unless someone would like to give me assistance in debugging it
further).

Since gdb was not much help, I have modified the code slightly in
hopes of others being able to reproduce. With this modification I can
produce a deadlock / freeze on every run.

--

child() {
    sleep 0.00001
    kill -USR1 $$
    sleep 0.0001
    kill -USR1 $$
}

TRAPUSR1() {
    sleep 0.000001
    print -n "."
}

for i in {1..10}; do
    child &!
done

sleep 0.0000001
sleep 0.000001
sleep 0.00001
sleep 0.0001
sleep 0.001



Messages sorted by: Reverse Date, Date, Thread, Author