aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2011-05-30 21:41:06 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2011-05-30 21:41:06 +0000
commit562b28821e42f06574065fffa2c40a5320add44d (patch)
treed64d4699dad979af0803a66bfd2656806f9c0a56 /lib/libc
parent56599263c5291638a45e26bf29ebf4583aa173a6 (diff)
Notes
Diffstat (limited to 'lib/libc')
-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 20f2c16c8fd6..58044b3a64fa 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);