After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 651910 - vte_terminal_set_pty closes the pty without choice
vte_terminal_set_pty closes the pty without choice
Status: RESOLVED DUPLICATE of bug 79276
Product: vte
Classification: Core
Component: general
0.24.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-06-05 07:22 UTC by Michael Trausch
Modified: 2011-10-28 12:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Trausch 2011-06-05 07:22:15 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?
Comment 1 Christian Persch 2011-06-05 11:08:48 UTC
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.
Comment 2 Michael Trausch 2011-06-05 15:10:29 UTC
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.
Comment 3 Christian Persch 2011-10-28 12:58:36 UTC
Yes, this should be done generically, as part of bug 79276.

*** This bug has been marked as a duplicate of bug 79276 ***