diff options
author | Elliott Hughes <enh@google.com> | 2021-03-17 21:46:27 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-03-18 03:06:06 -0500 |
commit | 81908f2ff28c6e131bfd81ff3c5d1b9ee93ef038 (patch) | |
tree | fb65d607ea488ee92f640f3b990561b54cb9e6be /www/code.html | |
parent | 1cc17b2f2fe93fdf71ffb650c6013b7560dd2d2f (diff) | |
download | toybox-81908f2ff28c6e131bfd81ff3c5d1b9ee93ef038.tar.gz |
telnetd: don't exit if waitpid() returns 0.
Noticed while using telnetd to manually test some telnet fixes: telnetd
would sometimes exit when I'd disconnect because it couldn't find pid 0
on its list of sessions.
I've not seen obscure exits because select() times out, but I've also
changed that `return` to an error_exit() so we'll at least know what's
happened if that ever occurs.
Also use <arpa/telnet.h> rather than manually #define'ing its constants,
use the FLAG() macro throughout, and xsetsockopt(). Don't pointlessly
set errno to 0 at the start of main and then never look at it again.
Diffstat (limited to 'www/code.html')
0 files changed, 0 insertions, 0 deletions