proxygen
folly::Subprocess::ChildPipe Struct Reference

#include <Subprocess.h>

Public Member Functions

 ChildPipe (int fd, folly::File &&ppe)
 

Public Attributes

int childFd
 
folly::File pipe
 

Detailed Description

The child's pipes are logically separate from the process metadata (they may even be kept alive by the child's descendants). This call lets you manage the pipes' lifetime separetely from the lifetime of the child process.

After this call, the Subprocess instance will have no knowledge of these pipes, and the caller assumes responsibility for managing their lifetimes. Pro-tip: prefer to explicitly close() the pipes, since folly::File would otherwise silently suppress I/O errors.

No, you may NOT call this from a communicate() callback.

Definition at line 895 of file Subprocess.h.

Constructor & Destructor Documentation

folly::Subprocess::ChildPipe::ChildPipe ( int  fd,
folly::File &&  ppe 
)
inline

Definition at line 896 of file Subprocess.h.

896 : childFd(fd), pipe(std::move(ppe)) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567

Member Data Documentation

int folly::Subprocess::ChildPipe::childFd

Definition at line 897 of file Subprocess.h.

folly::File folly::Subprocess::ChildPipe::pipe

Definition at line 898 of file Subprocess.h.


The documentation for this struct was generated from the following file: