Use /dev/null for stdout/stderr in libzfs_run_process().
authorGunnar Beutner <gunnar@beutner.name>
Fri, 29 Jul 2011 08:17:46 +0000 (10:17 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 1 Aug 2011 20:52:23 +0000 (13:52 -0700)
commit3132cb397ad1b60cac548b35ad8bbd4c7183fde4
tree8b748cc67e44ebc826096df32f7258c572c2aa67
parent5333eb0b3b18d345052b8cfaf41b90a0c5781fb8
Use /dev/null for stdout/stderr in libzfs_run_process().

Simply closing the stdout and/or stderr file descriptors for
the child process can have bad side effects if for example
the child writes to stdout/stderr after open()ing a file.
The open() call might have returned the same file descriptor
one would usually expect for stdout/stderr (1 and 2), thereby
causing mis-directed writes.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #190
lib/libzfs/libzfs_util.c