mirror of
https://github.com/uselessd/alcove.git
synced 2026-04-15 17:25:33 +00:00
Since stdout is used for control and for data, add a new message type (proxy) to distinguish them. When a child calls exec(): * if the call is unsuccessful, the child writes a term to stdout which the parent proxies * if the call is successful, no value is returned but the child will close the control socket on exec. The parent will "spoof" an "ok" response. Allocate the message headers on the heap to make it easier to layer them. If the child process has not exec'ed, use the packet length to avoid having multiple writes coalesce into a single read. Before checking if an fd is ready, ensure the fd is a positive value. On freebsd, invalid fd's cause FD_ISSET() to segfault.