Bug#450717: libterm-readkey-perl: Call to ReadKey(0) is not blocking anymore

Michael Gebetsroither gebi at sbox.tugraz.at
Tue Nov 13 10:20:44 UTC 2007


Quoting Niko Tyni <ntyni at iki.fi>:

> the child process is probably setting O_NONBLOCK on STDIN.
> Does it help if you do something like

indeed, startx/Xorg seems to set O_NONBLOCK on the console where it  
sends the output to.

>  use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
>
>  $flags = fcntl(STDIN, F_GETFL, 0)
>  or die "Can't get flags for STDIN: $!\n";
>
>  $flags = fcntl(STDIN, F_SETFL, $flags & ~O_NONBLOCK)
>  or die "Can't set flags for STDIN: $!\n";

worked, thx :)

cu,
michael







More information about the pkg-perl-maintainers mailing list