freebsd-dev/contrib/telnet
Jilles Tjoelker 524461f158 telnet: Fix infinite loop if local output generates SIGPIPE.
Instead of catching SIGPIPE and jumping out of the signal handler with
longjmp, ignore it and handle write errors to the local output by exiting
from there. I have changed the error message to mention the local output
instead of NetBSD's wrong "Connection closed by foreign host". Write errors
to the network were already handled by exiting immediately and this now
applies to EPIPE too.

The code assumed that SIGPIPE could only be generated by the network
connection; if it was generated by the local output, it would longjmp out of
the signal handler and write an error message which caused another SIGPIPE.

PR:		19773
Obtained from:	NetBSD
MFC after:	1 week
2010-04-30 19:52:35 +00:00
..
arpa Fix TELOPT(opt) when opt > TELOPT_TN3270E. 2008-09-13 17:46:50 +00:00
libtelnet Rename all symbols in libmp(3) to mp_*, just like Solaris. 2009-02-26 21:43:15 +00:00
telnet telnet: Fix infinite loop if local output generates SIGPIPE. 2010-04-30 19:52:35 +00:00
telnetd Forgot a part that was missing in the previous commit. 2010-01-13 18:46:50 +00:00