Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: TERM problems

by saintmike (Vicar)
on Sep 06, 2004 at 07:15 UTC ( [id://388739]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://388739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-16 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found