We were accidentally using the wrong variable (filter_pid instead of pid)
when looking at the result of a fork call, with the result that both
processes thought they were the parent.
/* Create a child process which can exec() the filter program. */
pid = fork();
/* Create a child process which can exec() the filter program. */
pid = fork();
throw IOException("Unable to fork filter process");
throw IOException("Unable to fork filter process");
/* Parent process */
close(fds[0]);
cloexec(fds[1]);
/* Parent process */
close(fds[0]);
cloexec(fds[1]);