mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Review Request 42864: Add subprocess methods to release ownership of pipe FDs.
Date Wed, 27 Jan 2016 20:45:03 GMT

-----------------------------------------------------------
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message