Subject: Re: kernel option for "socket: Protocol not supported"
To: None <tech-kern@NetBSD.org>
From: George Georgalis <george@galis.org>
List: tech-kern
Date: 02/22/2006 18:25:57
On Thu, Feb 23, 2006 at 09:28:39AM +1100, matthew green wrote:
>
> as long as a ssh patch is being considered.... it took an awful
> long time for me to realize
>
> "stdin: is not a tty"
>
> on scp, was due to a "mesg n" in a non-interactive shell rc
> file... I'm not even sure if this is from the shell or ssh
>
>
>this one is firmly in the "don't do that" camp. ie, don't have
>"mesg n" run by non-interactive rc files.
thank you for joining the thread.
It was definately in the "don't do what?" camp, for me.
The context is better error, debug or warning messages
and the issue is "stdin: is not a tty" provides no
indication of what triggered the warning.
As it happens, after spending a LOT of time looking, I
never figured it out, but eventually discovered the cause
serendipitously. I don't think it's unusual for a user to
incorrectly deposit interactive commands in a shell rc file, only
to notice a warning well after those changes where forgotten.
(maybe there should be a user regression testing howto?)
Now that I know what causes the message on scp commands, I still
am unable to determine where the warning is coming from, per grep
-r "is not a"; it doesn't seem in these
/usr/src/crypto/dist/ssh
/usr/src/crypto/dist/openssl
/usr/src/usr.bin/mesg
/usr/src/bin/ksh
If I may rephrase; the IPv4 vs IPv6 vague warnings
may be addressed, will try suggested changes soon;
will "stdin: is not a tty" be as straight forward?
What is generating the message?
There is no indication in mesg(1) that it is (only)
an interactive command, though that may be obvious
to people who understand. Maybe a solution is for
mesg to test if it has tty else 'mesg: has no tty'
to stderr && exit 0
// George
--
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org