![]() |
A problem with threads creates 300+ zombie processes
I have a problem with 4 threads (I think it doesn't matter what I'm trying to do) and for each thread I call pthread_join. My problem is it makes 300+ zombie processes and after the program finishes, I have no more zombie processes, so I suppose it kills all of them somehow. The point is the problem works fine on my computer, but I'm a student and this is one of my homeworks, and I have to show this problem to a teacher at school, and I know we have there a 100 processes limit, and it won't work there.
In my thread function I call a popen like this: Code:
strcpy (s, "ps -axuf 2>/dev/null | grep "); |
Problem solved. This happened because I forgot this:
Code:
pclose(f); |
All times are GMT -5. The time now is 12:04 PM. |