Why is my Java web service unable to reach the Perl backend?

Java service uses ProcLauncher to initiate a backend job that calls a Perl script performing an XML diff. The script stalls when printing errors, so no response returns.

Process process = new ProcessBuilder("runTask", "-flag", "EXECUTE").start();
sub log_error {
    my $error = shift;
    print STDERR "$error\n";
}

hey, im wonderin if the perl script isn’t flushin stderr properly, causin the hang. maybe a flush after print might help? have you played around with that yet, or seen any other buffering issues?

i think it may be a deadlock issue on the java side; if the error stream isn’t read concurrently it might fill up and block the process. try reading both streams in parallel to see if that helps.