Yes, the system resource that I mentioned above is available memory.
In popen, I call pclose (not close). If pclose and close can do the same work, then I should have re-collected unused momroy. Exausted available memory should not happen in this scenario. Quite strange.
In fork scenario, I call execlp to execute unzip/unrar in child process. I supposed that after executed execlp, the child process is ended. Can't OS re-collect the memory occupied by child process?
According to your words, I have to call waitpid() to free occupied memory. I will try it. Thanx.
Added:
I checked your xepdmgr.c. I think the relevant section are:
Code:
static
int ReapChildren(int Pid)
{
int reaped_pid,status;
while(1) {
reaped_pid=waitpid(-1,&status,WNOHANG|WUNTRACED);
if(reaped_pid<=0)
break;
if(reaped_pid==Pid)
return(0);
}
return(-1);
}