VMS-style Virtual Terminals.

Jeffery S. Coy Jr. (TIGRANA@DSTIUK.CCMAIL.CompuServe.COM)
29 May 97 10:53:17 EDT


Dear Linux Kernel Community,

I have got a question for kernel and tty line discipline gurus.
I have a PC that telnets to a Linux (or any other UNIX) machine and runs an
application. It is very critical to be able to resume the session even if PC is
rebooted or the telnet socket on the client side is closed for ANY reason.
Usually, this would cause the session to be closed and if the process ignores
SIGHUP then it will "hang in the air" with no means of resuming it.
I need something that would allow (in a way portable to other UNIXes but even
Linux-specific ideas would be VERY APPRECIATED):

a) prevent losing ctty for the process.
b) allow to reconnect to the old session later similar to the way VMS allows to
attach to interactive session on next login.

I am aware of ttysnoop that allows to connect to any session (that was
started by ttysnoops) but if the controlling terminal is lost then there is
not much ttysnoop can do.

On a STREAMS-based UNIX I was actually thinking of writing a streams module to
be pushed above tcp but below tnmod (telnet) and never allow tnmod to see
M_HANGUP (or whatever the message that indicates the close of the tcp
connection) but I don't know enough about writing kernel code for the system
which does not come with kernel source and it is difficult to link one's stuff
into the kernel "blindly".

On the Linux-specific side I was thinking about hacking the telnetsnoopd to
ingnore the fact that the client side of the telnet socket is closed and keep
the pseudo-tty alive so that ttysnoop client could connect to it and resume the
session.

Any ideas would be highly appreciated, but if you do reply PLEASE cc my direct
email address <tigrana@dstiuk.ccmail.compuserve.com> as I am not subscribed to
linux-kernel list here at work.

Thanks in advance,
Tigran A. Aivazian.