Changeset - d0afb12646d7
[Not reviewed]
0 1 0
Jan Kaluza - 13 years ago 2012-02-20 14:31:23
hanzz.k@gmail.com
Fixed zombie process caused by bad waitpid call
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -175,7 +175,7 @@ static void SigCatcher(int n) {
 
	int status;
 
	// Read exit code from all children to not have zombies arround
 
	// WARNING: Do not put LOG4CXX_ here, because it can lead to deadlock
 
	while ((result = waitpid(0, &status, WNOHANG)) > 0) {
 
	while ((result = waitpid(-1, &status, WNOHANG)) > 0) {
 
		if (result != 0) {
 
			if (WIFEXITED(status)) {
 
				if (WEXITSTATUS(status) != 0) {
0 comments (0 inline, 0 general)