Quote:
Originally Posted by d_maniger06
it is in the child process that i send a message through a socket..the message was also not sent to the destination because the other end has not received any message..also when i do "ps -efa", the process is still there since the process is now duplicated..after some minutes or even hours, the process is still there and i know that it is the same process since the pid is the same as before..
|
ok so it is not stdout/shell problem , my second guess
obviously is child process is deadlocked .
pthread_atfork says that child will have copy of parent
synchronization states after fork, and that copy
may not be consistent causing it to deadlock .
first try to run the initial code you posted
on its own outside pthread context .
if problem occurs then the second guess is wrong too .
and you can try gdb , read some tutorial about
thread/process commands in gdb , and you will most
probably be able to see clearly how does the child
behave .