From 865511899f6543cfb8cdd150516e39ebb8a98981 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Thu, 14 May 2015 13:14:32 +0000 Subject: [PATCH] Ignore exception if closing a closed file git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38495 72102866-910b-0410-8b05-ffd578937521 --- EcProcess.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/EcProcess.m b/EcProcess.m index fd15eaf..9eb7a76 100644 --- a/EcProcess.m +++ b/EcProcess.m @@ -1410,7 +1410,10 @@ static NSString *noFiles = @"No log files to archive"; * Ensure that all data is written to file. */ fflush(stderr); - [hdl closeFile]; + NS_DURING + [hdl closeFile]; + NS_HANDLER + NS_HANDLER /* * If the file is empty, remove it, otherwise move to archive directory. @@ -1518,7 +1521,10 @@ static NSString *noFiles = @"No log files to archive"; if (desc != 2) { dup2(desc, 2); - [hdl closeFile]; + NS_DURING + [hdl closeFile]; + NS_HANDLER + NS_HANDLER hdl = [NSFileHandle fileHandleWithStandardError]; } }