Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Dec 2000 21:47:55 +0100
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Re: telnet's exit status on normal exit
Message-ID:  <20001209214755.D27042@speedy.gsinet>
In-Reply-To: <Pine.BSF.4.21.0012091654090.44564-100000@ramstind.gtf.ol.no>; from trond@ramstind.gtf.ol.no on Sat, Dec 09, 2000 at 05:01:34PM %2B0100
References:  <Pine.BSF.4.21.0012091654090.44564-100000@ramstind.gtf.ol.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 09, 2000 at 17:01 +0100, Trond Endrest=F8l wrote:
>=20
> Why does telnet always exit with exit status 1 when run
> non-interactive?

Aehm, is telnet supposed to exit with any determined exit status?
Reading "man telnet" every search for "exit" or "return" fails.
And skimming over the sections there's none about this topic
(where others have a list of diagnostic codes, etc).

Maybe netcat (it's in the ports) would be helpful for you.  From
my personal experience I never found telnet to be handy for being
"remote controlled".  That's why I don't know it any other way
then interactive. :)

> I have noticed this behaviour since I started with 2.2.8, and
> thought it would be nice to know the reason for this strange
> behaviour.

UTSL, if your interest in strong enough. :>  I guess the exit
code has never been of concern and your experience with it being
0 or 1 comes from different program paths followed when
prompted/prompting or not.


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
--=20
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001209214755.D27042>