diff --git a/tty.c b/tty.c index 1ecb0e515..60098501d 100644 --- a/tty.c +++ b/tty.c @@ -1158,8 +1158,17 @@ static int dump_one_pty(int lfd, u32 id, const struct fd_parms *p) * we don't check for errors here since it makes * no sense anyway, the buffered data is not handled * properly yet. + * + * Note as well that if we have only one peer here + * the external end might be sending the data to us + * again and again while kernel buffer is not full, + * this might lead to endless SIGTTOU signal delivery + * to the dumpee, ruining checkpoint procedure. + * + * So simply do not flush the line while we dump + * parameters tty never was being a guaranteed delivery + * transport anyway. */ - ioctl(lfd, TCFLSH, TCIOFLUSH); if (!tty_test_and_set(e.tty_info_id, tty_bitmap)) ret = dump_pty_info(lfd, e.tty_info_id, p, major, index);