Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!st-andy!larry From: larry@st-andy.uucp (Larry Martell) Newsgroups: comp.unix.shell Subject: Re: ambiguous tty Message-ID: <1991Apr11.161459.2785@st-andy.uucp> Date: 11 Apr 91 16:14:59 GMT References: <1991Mar28.192420.21918@citib.com> Reply-To: uunet!st-andy!larry (Larry Martell) Distribution: na Organization: RMJ Securities Corp. Lines: 32 In article <1991Mar28.192420.21918@citib.com> scairns@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