in reply to TERM problems

Every program running on Unix can check if its input/output is connected to a tty or not. In Perl, this is done via
if(-t STDOUT) { print "tty\n"; } else { print "no tty\n"; }
If you run this program from the command line, it'll print tty. If you run it via a remote shell on another host, you'll see no tty.

I suspect your program is checking this and prints an error if it finds out about it.

Replies are listed 'Best First'.
Re^2: TERM problems
by hotshot (Prior) on Sep 06, 2004 at 07:30 UTC
    I added your test in the begining of myprog and as you said it printed tty when running from the localhost and no tty when running from the remote host, but I have no other test for it that can print the error I get. What can cause the error (maybe perl checks this)?

      It's not an error, it's a warning. rsh is insecure anyway. Why not use ssh which will work fine (see the -t and -T options) .....

      ssh -t some.host.com <command>

      cheers

      tachyon