applications with an asynchronous version of
that is integrated with the ivykis event loop.
After initialising a
struct iv_popen_request object using
IV_POPEN_REQUEST_INIT and assigning its
->type members, one can call
iv_popen_request_submit on it to fork off a child process which will call
->argv, while in the parent process returning a file descriptor that is
connected to the childs standard input (if
->type equals "w") or standard output (if
->type equals "r").
When the application is done with the child process, it should call
iv_popen_request_close, and close the file descriptor returned by
iv_popen_request_submit (this is not done automatically).
iv_popen will continue to monitor the childs process state while it is
running, by registering an
interest for its process ID.
If the child process has not yet terminated when
iv_popen_request_close is called,
iv_popen will attempt to terminate the child process in the background by
sending it a series of SIGTERM and SIGKILL signals.
iv_popen_request_close must be called from the same thread that
iv_popen_request_submit was called from on this object.