Comment 6 for bug 1558236

Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

# Workaround? Tried once, works.

TL;DR: reading the slave pts from another process unfreezes and allows continued operation

  cd /proc/24621/fd

  ls -al

total 0
dr-x------ 2 stephane stephane 0 avril 5 16:39 .
dr-xr-xr-x 9 stephane stephane 0 avril 5 15:13 ..
lrwx------ 1 stephane stephane 64 avril 5 16:56 0 -> /dev/pts/8
lrwx------ 1 stephane stephane 64 avril 5 16:56 1 -> /dev/pts/8
lrwx------ 1 stephane stephane 64 avril 5 16:39 2 -> /dev/pts/8
lrwx------ 1 stephane stephane 64 avril 5 16:56 3 -> /dev/ptmx
lrwx------ 1 stephane stephane 64 avril 5 16:56 4 -> /dev/pts/20
lrwx------ 1 stephane stephane 64 avril 5 16:56 5 -> anon_inode:[signalfd]
l-wx------ 1 stephane stephane 64 avril 5 16:56 6 -> /home/stephane/typescript (deleted)

So, pts/8 is the master, pts/20 is the slave.

  echo foo >/dev/pts/8

-> This shows "foo" in the terminal window.

  head -n 1 /dev/pts/8

^C

This blocks my shell, so I do Ctrl-C to regain.

  echo foo >/dev/pts/20

This blocks my shell, so I do Ctrl-C to regain.

^Cbash: echo: erreur d'écriture : Appel système interrompu

This one is interesting:

  head -n 1 /dev/pts/20

It does not block, and works around the bug immediately.

I'll try again.