Maybe a dumb question here. Why is a child process needed? Can the parent process not open a pipe, write its own state into the pipe, and then call exec, allowing the new binary to read from the pipe? Will exec destroy the pipe if there is no child process?
A pipe is a pipe, it's not a store. The buffer amount is not defined but usually you only get to write something like 512 bytes into it before it blocks.
(you could probably do the same thing by persisting state into a file, though)