qemu-char: fix deadlock with "-monitor pty"