From b8d5cc298d02d47a7e87d26bc956c3473bed57ba Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 3 Jan 2008 16:10:14 +0000 Subject: Saving the errno variable. --- lib/TaskMan.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 @@ -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 } -- cgit v1.2.3