mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-20 18:32:09 +00:00
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
This commit is contained in:
parent
3a32e58eee
commit
865511899f
1 changed files with 8 additions and 2 deletions
10
EcProcess.m
10
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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue