Removing these lines seem to fix things:
// close Forked stdout and the read end of the pipe close(1);
I wonder what it was trying to accomplish in the first place...
Removing these lines seem to fix things:
// close Forked stdout and the read end of the pipe
close(1);
I wonder what it was trying to accomplish in the first place...