[Mac-emacs-devel] Subprocess Bug Fix
Brought to you by:
akochoi
|
From: Andrew C. <ak...@cs...> - 2001-12-08 07:55:12
|
Hi Everyone!
With the patch emacs-21.1-2-mac.patch.gz for building Emacs 21.1 on
Mac OS X, you should be experiencing problems with subprocesses not
completely returning all their output.
Please try the following patches for the files src/process.c and
src/s/darwin.h.
Andrew.
-----
--- emacs-21.1/src/process.c Tue Sep 25 16:21:22 2001
+++ emacs/src/process.c Tue Dec 4 09:03:31 2001
@@ -2512,6 +2512,14 @@
if (update_tick != process_tick && do_display)
{
Atemp = input_wait_mask;
+#ifdef MAC_OSX
+ /* On Mac OS X, the SELECT system call always says input is
+ present (for reading) at stdin, even when none is. This
+ causes the the call to SELECT below to return 1 and
+ status_notify not to be called. As a result output of
+ subprocesses are incorrectly discarded. */
+ FD_CLR (0, &Atemp);
+#endif
EMACS_SET_SECS_USECS (timeout, 0, 0);
if ((select (max (max_process_desc, max_keyboard_desc) + 1,
&Atemp, (SELECT_TYPE *)0, (SELECT_TYPE *)0,
--- emacs-21.1.30/src/s/darwin.h Sat Jun 30 23:21:19 2001
+++ emacs/src/s/darwin.h Wed Dec 5 12:06:47 2001
@@ -76,7 +76,7 @@
to read the input and send it to the true Emacs process
through a pipe. */
-#define INTERRUPT_INPUT 1
+#define INTERRUPT_INPUT
/* Letter to use in finding device name of first pty,
if system supports pty's. 'a' means it is /dev/ptya0 */
@@ -103,7 +103,7 @@
* Define HAVE_PTYS if the system supports pty devices.
*/
-#define HAVE_PTYS
+/* #define HAVE_PTYS */
/*
* Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
|