ISC unix FIONBIO PTY bug?

James Van Artsdalen james at bigtex.cactus.org
Tue Oct 2 13:51:14 AEST 1990


I am testing GNU emacs 18.56 under SysVr3.  Support for SysV PTYs
works fine, except for a bug in SysVr3 involving telnet-mode.  This
same problem exists in 18.55 for me also.  I would like to hear from
anyone who has this working, or has insight into the problem.

These are the options I use in 18.55 config.h with libinet.a:

#define HAVE_SELECT
#define HAVE_PTYS
#define SYSV_PTYS
#define HAVE_SOCKETS
#define HAVE_TIMEVAL
#define HAVE_GETTIMEOFDAY
#define USE_UTIME
#define FIOCLEX TIOCEXCL

There are also various changes to make PTYs work, which do correctly
set FIONBIO and redundantly O_NDELAY.

The way to invoke failure is to start emacs, and type "M-x telnet",
select "local" as the host, log in through telnet, and then log out.
emacs is now hung, and requires C-G twice to abort to the shell.

What happens is that emacs hangs reading from the PTY file descriptor,
in spite of O_NDELAY, and in spite of FIONBIO.  The telnetd on the
other end of the socket has died, but the telnet(1) on the local side
has not, so there is no SIGCHLD to emacs.
-- 
James R. Van Artsdalen          james at bigtex.cactus.org   "Live Free or Die"
Dell Computer Co    9505 Arboretum Blvd Austin TX 78759         512-338-8789



More information about the Comp.unix.sysv386 mailing list