diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2015-01-14 17:55:53 +0100 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-01-16 01:05:14 -0800 |
commit | 2466f4debbb629cf847c42f5d317cd5627b095c1 (patch) | |
tree | df604bba96de2feab4a702c54d31541172ef8451 | |
parent | 9ab533ff86dbf914b47228a9326fefd9ba04c65f (diff) |
NetBSD portability fix: recover errno on runner error
Some time ago we introduced F_CLOSEM to efficiently close unused
file descriptors when using a runner. But since it also close the
file descriptor used to send back errno to glusterd, it got unable
to detect an error on execve().
Fix this by backing out F_CLOSEM usage.
BUG: 1129939
Change-Id: I40d3255555145e04e8feafaa2ff4e5fb1570e9a2
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/9447
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | libglusterfs/src/run.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c index 93fe12aed10..5d7f1d207b1 100644 --- a/libglusterfs/src/run.c +++ b/libglusterfs/src/run.c @@ -290,9 +290,6 @@ runner_start (runner_t *runner) } else ret = -1; #else /* !GF_LINUX_HOST_OS */ -#ifdef F_CLOSEM /* NetBSD */ - (void)fcntl(3, F_CLOSEM); -#else /* !F_CLOSEM */ struct rlimit rl; ret = getrlimit (RLIMIT_NOFILE, &rl); GF_ASSERT (ret == 0); @@ -301,7 +298,6 @@ runner_start (runner_t *runner) if (i != xpi[1]) close (i); } -#endif /* !F_CLOSEM */ #endif /* !GF_LINUX_HOST_OS */ } |