$proc.print is asynchronous while $proc.close-stdin is not. In some cases $proc simply does not get the input because we closed its stdin before printing anything.
If .close-stdin is meant to by synchronous, this needs a doc patch. Otherwise we'd probably need to await any outstanding write promises before performing the actual nqp::closefh.