Commit 52874e6a authored by James Johnston's avatar James Johnston Committed by Brad King
Browse files

Process: Fix leaked file descriptor in ProcessUNIX

kwsysProcess leaked a file descriptor every time a process would start.
This was causing exhaustion of available file descriptors on some
operating systems (e.g. Mac OS X).

Change-Id: I78eed0755f9766065c36460ffab468b2d7d1df12
parent 906c2cae
......@@ -1979,6 +1979,7 @@ static int kwsysProcessCreate(kwsysProcess* cp, int prIndex,
kwsysProcessCleanupDescriptor(&pgidPipe[0]);
return 0;
}
kwsysProcessCleanupDescriptor(&pgidPipe[0]);
/* Unmask signals. */
if(sigprocmask(SIG_SETMASK, &old_mask, 0) < 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment