Revert r31614 as it breaks the build, although we get a flood of warnings without it
Fixes #4550: Move r31469 to v1.8 branch (ORTE: don't let children inherit open fds)

---svn-pre-commit-ignore-below---

r31469 [[BR]]
plm_slurm_module.c: don't leave the extra fd to /dev/null open

Prior to r29058, this same logic was in place (i.e., ensure that the
extra fd to /dev/null is closed).  It looks like it was accidentally
removed in the ORTE conversion to the state machine in r29058.

This ''might'' have something to do with many hangs that we're seeing
in Cisco MTT with jobs that exhibit failure (e.g., call MPI_ABORT)...?

cmr=v1.8.2:reviewer=rhc

r31499 [[BR]]
orterun.c: set an fd to be close-on-exec

Make sure the debugger attach fifo is marked as close-on-exec so that
children procs don't inherit it.  For example, if you salloc a SLURM
allocation and run "mpirun ..." in there (i.e., mpirun is running on
the head node, and launching on to back-end nodes), the forked srun's
will inherit this fd if it is still open.

Refs #4550

r31511 [[BR]]
hwloc: ensure that an internal fd is marked as close-on-exec

Make sure that an internal, long-lived hwloc fd is marked as
close-on-exec so that children don't inherit it.  This patch is
committed upstream in the hwloc master and v1.9 branches as 7489287
and b654e19, respectively.  The patch applied here is the exact same
logic, but the surrounding code changed slightly since the hwloc v1.7
series, so the patch doesn't apply cleanly.

Refs #4550

r31512 [[BR]]
oob_tcp_listener.c: set both ends of this thread to be close-on-exec

This pipe is used to communicate between threads in this process.
Mark both fd as close-on-exec so that children don't inherit this
pipe.

Refs #4550

r31513 [[BR]]
opal/util/fd.c: add new convenience function for setting FD_CLOEXEC

Paul Hargrove pointed out that Stevens tells us that we should
FD_GETFL before FD_SETFL.  And so we shall.

Make a new convenience function to do this (opal_fd_set_cloexec()),
just so that we don't have to litter this 2-step process throughout
the code.

Refs #4550

r31514 [[BR]]
Sigh.  It helps when you commit the right version of the finished
code.

This commit fixes minor errors in the incorrectly-committed r31513
(new fd close-on-exec convenience function).

Refs #4550

r31515 [[BR]]
Close 3 more fd's that were leaking into child processes.

Child processes now look clean; I can't find any more fd's that are
leaking from the parent to children.

Refs #4550