GNOME Bugzilla – Bug 651910
vte_terminal_set_pty closes the pty without choice
Last modified: 2011-10-28 12:58:36 UTC
I am trying to write a small Python program that uses VTE, and add ZMODEM support to it (I have occasion to use it every now and again where it is my only option). I'd eventually like to fold that into GNOME Terminal, but there is a problem: VTE needs to be told to not read/write the PTY while the rz command (at least for receiving, I haven't got to thinking about sending yet) is using the PTY. Pseudocode to show what should be possible: feed 'Starting ZMODEM' set_pty -1 execute 'rz' using the pty as stdin/stdout set_pty old_pty feed 'ZMODEM finished' However, when set_pty is called the first time, it closes the PTY and thus it becomes invalid. If rz attempts to use the PTY at the same time that VTE is using the PTY, however, it fails, because rz never sees the reply from the remote sz. Perhaps the addition of a vte_terminal_set_pty_noclose function (or something with a different name but a similar purpose) would be useful?
I think that part should work with vte 0.26 and using VtePty. However, I don't think this is the right way to implement zmodem (bug 79276). Instead, this should be handled inside vte, which would divert input resp. output from the pty to another stream temporarily while sending/receiving zmodem.
It would be the correct way to implement generic support for redirection of the stream. Applications should be able to implement any thing like this, without modifying VTE. What if someone wants to implement Kermit? Or XMODEM? Certainly those would not have to be added separately? Generic is probably the right thing to do here.
Yes, this should be done generically, as part of bug 79276. *** This bug has been marked as a duplicate of bug 79276 ***