-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42864/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman and Artem Harutyunyan.


Bugs: MESOS-4535
    https://issues.apache.org/jira/browse/MESOS-4535


Repository: mesos


Description
-------

Adds the methods `release_in/out/err` for transferring ownership of FDs created 
via `Subprocess::PIPE`.  This is necessary if the pipe FD is closed before the 
subprocess terminates.

For example, passing the pipe into `Subprocess::FD(<pipe>, IO::OWNED)` will 
close the pipe in the parent.


Diffs
-----

  3rdparty/libprocess/include/process/subprocess.hpp 
482ea23410300997956e2a8ece397cb96157894c 
  3rdparty/libprocess/src/tests/subprocess_tests.cpp 
09e46eb1ce10a6c38cc364077f0b5952579d46e7 

Diff: https://reviews.apache.org/r/42864/diff/


Testing
-------

make check (OSX)

The new test mimics how the LogrotateContainerLogger uses subprocesses.  If you 
change `sink->release_in().get()` to `sink->in().get()`, the test will fail.


Thanks,

Joseph Wu

Reply via email to