in reply to Re^3: Timeout on STDIN
in thread Timeout on STDIN

Thanks... I thought I had that set but I didn't I tried again with

 $|=1  $msg=<STDIN>

still works

but the ReadKey never seems to get characters

$key = ReadKey(1);

My script is being opened as a child of another process and that process prints strings to stdin (not using a keyboard)

Replies are listed 'Best First'.
Re^5: Timeout on STDIN
by soonix (Chancellor) on Oct 24, 2016 at 11:43 UTC
    Then perhaps not STDIN of your (child) script, but STDOUT of the parent script (or whatever its corresponding file handle is) may be buffered?

      I believe STDOUT from my parent always flushes (so <STDIN> always works if the parent is working)

      My problem occurs if the parent hangs, because the child process then hangs waiting for <STDIN>

      So I was hoping for a way to be able to timeout waiting for <STDIN>