Errg. I think this is the wrong thing to do. We must continue to use the
cygwin signal implementations so that we interact with subprocesses etc
correctly.
andy
At 01:31 PM 6/7/01 -0400, Paul Stodghill wrote:
> > First, I've started noticing the dreaded "random
lockups" since the
> > change to set BROKEN_SIGIO. I will let you know if I continue to observe
> > them with the most recent set of changes.
>
> uh oh.
>
> if this keeps happening, please try out the definition of setitimer[]
> in nt.c in place of calling cygwin's setitimer[] library function.
> [all that BROKEN_SIGIO does is establish a timer every 1/4 of a
> second.]
I've done this, and I have been running for about 24hrs without any
lockups. Furthermore, maybe it's my imagination, but, XEmacs now seems
"snappier". It seems to respond quicker to interactive input and it
Gnus/nnimap seems to work more quickly. However, I have seen a few
random crashes that produce the following output -
milhouse$ xemacs
Window procedure called during GC???????
Window procedure called during GC???????
Window procedure called during GC???????
Window procedure called during GC???????
Window procedure called during GC???????
Window procedure called during GC???????
Fatal error: assertion failed, file events.h, line 496, RECORD_TYPEP
(obj, lrecord_type_event)
milhouse$
[ Ben, is this the same bug that you are/were working on? ]
Here is what I did -
o make distclean
o apply the patch at the end of this message
o add nt.o to extra_objs in src/Makefile
o make
These changes cause XEmacs/Cygwin to use the signal emulation functions
intended for native Windows instead of the routines provided by Cygwin.
What should I do now? Should I cleanup my changes and submit them to
xemacs-patches? I'm reluctant do this without someone more knowledgable
than I saying "go for it". This seems like a pretty major change to the
Cygwin platform....
Index: src/nt.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/nt.c,v
retrieving revision 1.26
diff -u -r1.26 nt.c
--- src/nt.c 2001/06/02 06:16:55 1.26
+++ src/nt.c 2001/06/07 13:32:05
@@ -41,9 +41,13 @@
#include "syswindows.h"
#include "nt.h"
+#ifndef __CYGWIN__
#include "ntheap.h"
+#endif // !__CYGWIN__
+#ifndef __CYGWIN__
+
extern Lisp_Object Vmswindows_downcase_file_names;
#if 0
extern Lisp_Object Vwin32_generate_fake_inodes;
@@ -1805,6 +1809,8 @@
}
#endif
+#endif // !__CYGWIN__
+
/*--------------------------------------------------------------------*/
/* Signal support */
/*--------------------------------------------------------------------*/
@@ -2030,6 +2036,7 @@
}
+#ifndef __CYGWIN__
/*--------------------------------------------------------------------*/
/* Memory-mapped files */
/*--------------------------------------------------------------------*/
@@ -2337,5 +2344,7 @@
*/ );
nt_fake_unix_uid = 0;
}
+
+#endif // !__CYGWIN__
/* end of nt.c */
Index: src/syssignal.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/syssignal.h,v
retrieving revision 1.9
diff -u -r1.9 syssignal.h
--- src/syssignal.h 2001/04/12 18:24:23 1.9
+++ src/syssignal.h 2001/06/07 13:33:07
@@ -234,7 +234,7 @@
SIGTYPE memory_warning_signal (int sig);
#endif
-#ifdef WIN32_NATIVE
+#if defined(WIN32_NATIVE) || defined(__CYGWIN__)
/* Prototypes for signal functions, see nt.c */
typedef void (__cdecl *mswindows_sighandler) (int);
mswindows_sighandler mswindows_sigset (int sig, mswindows_sighandler
handler);
@@ -242,6 +242,6 @@
int mswindows_sigrelse (int nsig);
int mswindows_sigpause (int nsig);
int mswindows_raise (int nsig);
-#endif /* WIN32_NATIVE */
+#endif /* WIN32_NATIVE || __CYGWIN__ */
#endif /* INCLUDED_syssignal_h_ */
Index: src/s/cygwin32.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/s/cygwin32.h,v
retrieving revision 1.24
diff -u -r1.24 cygwin32.h
--- src/s/cygwin32.h 2001/05/31 12:45:41 1.24
+++ src/s/cygwin32.h 2001/06/07 13:33:35
@@ -153,3 +153,20 @@
#define CYGWIN_WIN32_PATH(src, dst) \
dst = (Extbyte *) alloca (cygwin_posix_to_win32_path_list_buf_size(src)); \
cygwin_posix_to_win32_path_list(src, dst)
+
+/* We now have emulation for some signals */
+#undef HAVE_SIGPROCMASK
+#define HAVE_SIGHOLD
+#define sigset(s,h) mswindows_sigset(s,h)
+#define sighold(s) mswindows_sighold(s)
+#define sigrelse(s) mswindows_sigrelse(s)
+#define sigpause(s) mswindows_sigpause(s)
+
+/* Defines that we need that aren't in the standard signal.h */
+#define SIGHUP 1 /* Hang up */
+#define SIGQUIT 3 /* Quit process */
+#define SIGKILL 9 /* Die, die die */
+#define SIGALRM 14 /* Alarm */
+#undef SIGPROF
+#define SIGPROF 29 /* Profiling timer exp */
+