note
quester
<p>I don't have a copy of DCE-Whisperer to test with, so take this with a grain of salt...</p>
<p>If I change the child process to /bin/cat, I can get the script to run if I uncomment the print $in AND change it to</p>
<code>
print $in "PING\n";
</code>
<p>which works because (in <i>this</i> case) it flushes the buffer for $in. You could also flush the $in buffer with</p>
$|=1;
<p>depending on the child process - for example cat doesn't work without a "\n".</p>
<p>However, you may be running into buffering issues with DCE-Whisperer as well. As [doc://IPC::Open2|the documentation for IPC::Open2] mentions, "The big problem with this approach [that is, IPC::Open2 itself] is that if you don't have control over source code being run in the child process, you can't control what it does with pipe buffering.... The IO::Pty and Expect modules from CPAN can help with this, as they provide a real tty (well, a pseudo-tty, actually), which gets you back to line buffering in the invoked command again."</p>
939017
939023