summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/posix_spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/posix_spawn.c')
-rw-r--r--lib/libc/gen/posix_spawn.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
index 20f2c16..58044b3 100644
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -163,11 +163,8 @@ process_file_actions_entry(posix_spawn_file_actions_entry_t *fae)
return (errno);
break;
case FAE_CLOSE:
- /* Perform a close() */
- if (_close(fae->fae_fildes) != 0) {
- if (errno == EBADF)
- return (EBADF);
- }
+ /* Perform a close(), do not fail if already closed */
+ (void)_close(fae->fae_fildes);
break;
}
return (0);
OpenPOWER on IntegriCloud