3

Our network involves a series of dumb text terminals which telnet into a SCO OpenServer 6 server. Occasionally, one of these terminals will crash, forcing the operator to move to a different terminal until the broken terminal is either repaired or replaced.

This normally leaves hanging processes, and the related annoyances of important files not being closed down properly. Rather than manually killing the processes and closing/repairing the unclosed files, it would be so much more practical to just 'reattach' the existing processes to the new terminal and allow the operator to continue as if nothing happened.

So the question is: Is this even possible? And if so, what is the best way for me to go about doing it?

Matt Simmons
  • 20,396
  • 10
  • 68
  • 116
goldPseudo
  • 1,106
  • 1
  • 9
  • 15

3 Answers3

14

This is what the 'screen' utility was invented for. Although I've used it mainly on Linux, there's absolutely no reason a port for your OS couldn't exist. It's part of the gnu tool set, and I haven't found a port, but one probably exists (or could).

Matt Simmons
  • 20,396
  • 10
  • 68
  • 116
  • +1 spot on. Screen is invaluable for unreliable network connections or long running processes. – David Pashley Jun 06 '09 at 19:14
  • I have screen on OS X through macports. Was typing this same answer too and noticed yours ;) – l0c0b0x Jun 06 '09 at 19:19
  • screen looks like it will do exactly what I need. My only concern is that the existing system is not at all set up to handle VT100. – goldPseudo Jun 07 '09 at 00:31
  • 1
    Yep, does exactly what I was looking for. For reference, SCO OSR6 port of screen is available at http://www.sco.com/skunkware/. – goldPseudo Jun 08 '09 at 23:50
2

Screen is wonderful, as the previous answer has noted. It will probably solve your issue. For situations where screen is not appropriate (i.e. running a background task) look at nohup.

0

As the other two responders have noted screen is specifically intended for this use, and has a number of other useful features too.

I have set a number of hosts I connect to to run screen on each login, so I don't forget and only notice when something happens to cause an unexpected disconnect by which point it is too late. See http://tlug.dnho.net/?q=node/239 for one example of setting this up.

David Spillett
  • 22,754
  • 45
  • 67