summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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
}