The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

pty.t - Test suite for IPC::Run's pty (psuedo-terminal) support

DESCRIPTION

This test suite starts off with a test that seems to cause a deadlock on freebsd: \@cmd, '<pty<', ... '>', ..., '2>'...

This seems to cause the child process entry in the process table to hang around after the child exits. Both output pipes are closed, but the PID is still valid so IPC::Run::finish() thinks it's still alive and the whole shebang deadlocks waiting for the child to exit.

This is a very rare corner condition, so I'm not patching in a fix yet. One fix might be to hack IPC::Run to close the master pty when all outputs from the child are closed. That's a hack, not sure what to do about it.

This problem needs to be reproduced in a standalone script and investigated further, but I have not the time.