[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] woraround for buggy HPUX 11.00 select() causing emacs 21.2 to ha
[PATCH] woraround for buggy HPUX 11.00 select() causing emacs 21.2 to hang
Thu, 29 Aug 2002 13:30:12 -0400
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530
The attached patch works around a select() bug in HPUX 11.0.
I don't know whether this is a general problem in HPUX 11, but I
did notice on the HP support site that there is a patch for
HPUX 11.11 for this problem (it's how I fugured out what was
Essentially, the select() call is failing to time out when signals
are set up to use SA_RESTART. The problem happens when a periodic
signal (e.g. SIGALRM) never gives a chance for select() to time
out -- the restart causes select() to start its timeout counter
all over again.
To duplicate the problem, edit a file in a read-only directory
and attempt to save the file, or M-x man on some man page, then
hit return on a word in the man page that has no man page. Emacs
will hang in both cases.
I don't know whether it is a good idea to turn off SA_RESTART
for HPUX 11 in general -- I am just submitting this in case someone
else runs into this.
--- src/s/hpux11.h Wed Oct 31 12:32:45 2001
+++ src/s/hpux11.h Wed Aug 28 16:11:38 2002
@@ -6,3 +6,6 @@
#define POSIX_SIGNALS 1
+/* my version of HPUX 11.00 has a broken select() -- it does not time out
+#define HPUX_SELECT_BUG 1
--- src/sysdep.c Mon Nov 19 09:48:11 2001
+++ src/sysdep.c Thu Aug 29 12:47:13 2002
@@ -2803,7 +2803,7 @@
struct sigaction new_action, old_action;
new_action.sa_handler = action;
+#if defined(SA_RESTART) && !defined(HPUX_SELECT_BUG)
/* Emacs mostly works better with restartable system services. If this
* flag exists, we probably want to turn it on here.
|[Prev in Thread]
||[Next in Thread]|
- [PATCH] woraround for buggy HPUX 11.00 select() causing emacs 21.2 to hang,
Joe Buehler <=