mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Use closefrom() if available
This commit is contained in:
parent
15ff083a9a
commit
ae9892db11
5 changed files with 27 additions and 0 deletions
|
@ -1773,10 +1773,14 @@ GSPrivateCheckTasks()
|
|||
/*
|
||||
* Close any extra descriptors.
|
||||
*/
|
||||
#if defined(HAVE_CLOSEFROM)
|
||||
closefrom(3);
|
||||
#else
|
||||
for (i = 3; i < NOFILE; i++)
|
||||
{
|
||||
(void) close(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (0 != chdir(path))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue