1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-25 19:46:21 +00:00

FD_ISSET requires that the fd being tested is >= 0 (#78)

* FD_ISSET requires that the fd being tested is >= 0, so unset fd -1 causes trouble.

* Remove code to enable X I/O signal generation from xinit.c

If the I/O signals are enabled before the signal handler has
been set up, the default action on receipt of a SIGPOLL or SIGIO
will be that the program exits.  For now, turn the signals off,
as they aren't necessary and may not even be an improvement.

* Ensure fds are declared as signed and initialized (to -1)

The global fds may be accessed from the signal handler before any
particular device has been opened.  Ensure that the fds are initialized
statically and that the value is distinguishable from all valid descriptors.

	modified:   initdsp.c
	modified:   initkbd.c
	modified:   keyevent.c
	modified:   osmsg.c
	modified:   rs232c.c
	modified:   timer.c
	modified:   tty.c
This commit is contained in:
Nick Briggs
2020-12-16 22:09:18 -08:00
committed by GitHub
parent 0d4d9a5368
commit fe0f9fff2c
8 changed files with 13 additions and 16 deletions

View File

@@ -64,7 +64,7 @@ int log_id;
int previous_size;
int logChanged; /* T if log file has changed since last READ */
/* Set by flush_pty, to avoid the stat call */
u_int LogFileFd;
int LogFileFd = -1;
extern fd_set LispReadFds;
/************************************************************************/