title: How to export open file descriptors to execed children
body: <p>What are the portable options if one needs to export open file descriptors to child processes created using exec family of library functions?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT. I know that child processes inherit open descriptors. But how they use those descriptors without knowing their values? Should I implement some sort of IPC in order to pass descriptors to the child process? For example, if the parent creates a pipe, how can an execed child process know read/write ends of the pipe?</p>