Re: [hwloc-devel] PATCH: Mark fd as close-on-exec

2014-04-24 Thread Paul Hargrove
That looks good to me. -Paul [the paranoid portability policeman] On Thu, Apr 24, 2014 at 3:41 AM, Jeff Squyres (jsquyres) wrote: > On Apr 23, 2014, at 6:38 PM, Paul Hargrove wrote: > > > -Paul [Who always does what the late W. Richard Stevens says

Re: [hwloc-devel] PATCH: Mark fd as close-on-exec

2014-04-23 Thread Paul Hargrove
On Wed, Apr 23, 2014 at 4:14 PM, Brice Goglin wrote: > This code is only built on Linux Yes, of course! I neglected to look at the name of the file in question. No guard is needed for even my oldest Linux systems. -Paul -- Paul H. Hargrove

Re: [hwloc-devel] PATCH: Mark fd as close-on-exec

2014-04-23 Thread Brice Goglin
This code is only built on Linux so I am not sure we're more portable than OMPI here. The oldest Linux we've tested bwloc on is likely your machines ;) Brice On 24 avril 2014 00:48:46 UTC+02:00, Paul Hargrove wrote: >Since I suspect hwloc may run on *more* platforms than

Re: [hwloc-devel] PATCH: Mark fd as close-on-exec

2014-04-23 Thread Paul Hargrove
Currently, POSIX defines exactly one flag accessed via F_GETFD/F_SETFD and that is FD_CLOEXEC. However, it does not prohibit a conforming implementation from defining additional bits. So, a portable program should assume other bits may be set and try to preserve them. Quoting from section 3.14

[hwloc-devel] PATCH: Mark fd as close-on-exec

2014-04-23 Thread Jeff Squyres (jsquyres)
Any objections to this patch? In OMPI, we're seeing this fd leak into child processes. diff --git a/src/topology-linux.c b/src/topology-linux.c index e934d4c..8c5fba1 100644 --- a/src/topology-linux.c +++ b/src/topology-linux.c @@ -4601,6 +4601,13 @@ hwloc_linux_component_instantiate(struct