rsh & tar

Chris Torek chris at mimsy.UUCP
Fri Jun 2 09:14:43 AEST 1989


In article <19836 at adm.BRL.MIL> drears at pica.army.mil (Dennis G. Rears (FSAC))
writes:
>tar -cf - .|rsh drun  tar xf -
>
>I get the error message back:
>
>stty:  operation not support on socket

You have an `stty' command in your .cshrc.  Remove it (put it in your
.login instead).

Anything that produces output, including error output, in a .cshrc
must NOT be run if $prompt is not set, because `rsh' runs

	<name of login shell> "-c" <command>

to get the command to run---in this case,

	/bin/csh -c "tar xf -"

Csh always reads and executes .cshrc (unless its permissions or owner
are incorrect).  Input, output, and stderr are in this case connected to
a TCP (stream) socket rather than a tty; stty attempts to do as it is
told, fails because the socket does not allow setting tty characteristics,
and prints an error message.  In this case the `tar xf -' should complete
anyway; but rcp (e.g.) will abort.  (rcp runs `/bin/csh -c "rcp -f ..."' or
`/bin/csh -c "rcp -t ..."', if your login shell is csh.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list