summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-01-03 16:10:14 +0000
committerpixel <pixel>2008-01-03 16:10:14 +0000
commitb8d5cc298d02d47a7e87d26bc956c3473bed57ba (patch)
treecf551bb1e095249236dc336c6f8daa4d5373fd0c
parent54db14505bd22fcb452ced68a1243f97ac58d79e (diff)
Saving the errno variable.
-rw-r--r--lib/TaskMan.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index efd48f0..7ebdf7d 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.cc,v 1.51 2007-12-25 13:36:06 pixel Exp $ */
+/* $Id: TaskMan.cc,v 1.52 2008-01-03 16:10:14 pixel Exp $ */
#ifndef _WIN32
#include <signal.h>
@@ -71,6 +71,7 @@ void TaskMan::CleanChildren() {
#ifndef _WIN32
int status;
pid_t pid;
+ int old_errno = errno;
while (1) {
pid = waitpid(-1, &status, WNOHANG);
@@ -82,6 +83,8 @@ void TaskMan::CleanChildren() {
WaitFor(pid, 0, status);
}
}
+
+ errno = old_errno;
#endif
}