bjwf:
你是说用fork 替代pthread_create ?
[阅读: 876] 2004-12-29 08:11:45
if(fork() == 0)
{
record the proc PID
do_somthing();
return;
}
..........
//////////////////////////////////////
//
if(do_somthing time out)
{
kill proc
}
你说的是这个意思吗?即使在do_something里有malloc,kill也不产生mem leak ?