Re: deadlock in waitchld()

2013-05-24 Thread Roman Rakus
I have done a bit of debugging and have some results: The problem is that waitchld is called even if there aren't any children running. The waitchld() is called more then once. I don't know what is the logic behind it. Will check, if there is any child, helps? RR On 05/20/2013 04:11 PM, Roma

Re: deadlock in waitchld()

2013-05-24 Thread Roman Rakus
The race is in do-while loop in wait_for(). At the start of wait_for() we are blocking SIGCHLD, however echo process ends during the loop and we don't register it (don't handle SIGCHLD, which is sent). Looking at the code, there is MUST_UNBLOCK_CHLD. May it make any harm to enable it by default?

Re: deadlock in waitchld()

2013-05-24 Thread Chet Ramey
On 5/24/13 9:30 AM, Roman Rakus wrote: > The race is in do-while loop in wait_for(). At the start of wait_for() we > are blocking SIGCHLD, however echo process ends during the loop and we > don't register it (don't handle SIGCHLD, which is sent). > Looking at the code, there is MUST_UNBLOCK_CHLD. M