a process from hanging around when a telnet connection dies unexpectedly
$Log$
+ Revision 614.24 2004/02/09 22:26:17 error
+ * Exit the citadel client when EOF reached on input - should prevent
+ a process from hanging around when a telnet connection dies unexpectedly
+
Revision 614.23 2004/02/08 05:29:34 ajc
* Corrected various small syntax conversion problems that were keeping
some vCards out of the LDAP directory.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
/* At this point, there's input, so fetch it.
* (There's a hole in the bucket...)
*/
- a = scr_getc(SCR_NOBLOCK);
+ a = scr_getc(SCR_BLOCK);
if (a == 127)
a = 8;
if (a > 126)
#ifndef DISABLE_CURSES
#if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
if (a == ERR)
- a = 0;
+ logoff(NULL, 3);
#endif
#endif
#endif
buf = '\0';
- read (0, &buf, 1);
+ if (!read (0, &buf, 1))
+ logoff(NULL, 3);
return buf;
}