ambiguous tty

Larry Martell larry at st-andy.uucp
Fri Apr 12 02:14:59 AEST 1991


In article <1991Mar28.192420.21918 at citib.com> scairns at citib.com (Scott Cairns) writes:
>Any ideas on what might be causing the following to happen?
>
>% rsh [any remote machine] pwd (or any other command)
>`tty`: Ambiguous
>
>(output from rsh command)
>%
>
>This is driving me nuts trying to find out who what or
>where is generating this.  The same problem exists for
>shell scripts executed from cron(8).

This comes from any commands in your .login or .cshrc that mess with the 
tty modes (e.g. stty). These commands should not be executed during a
non-interactve login. You can test for this by examining the "prompt" shell
variable (I'm assuming csh here):

if ( $?prompt ) then
   stty kill 
   stty dec
endif

Of course if you set your prompt to some custom string you must perform
the above test before the statement that sets your prompt.

See the description of the "prompt" variable under the "Environment Variables 
and Predefined Shell Variables" section of the csh(1) man pages.
-- 
Larry Martell
uunet!st-andy!larry
212-668-9478



More information about the Comp.unix.shell mailing list