[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug
From: |
Steven Tamm |
Subject: |
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug |
Date: |
Fri, 21 Jan 2005 11:40:09 -0800 |
Your understanding is correct. However I had seen data loss even with
interactive processes, although the data was always useless.
Perhaps it would be better to have process-connection-type default to
nil with darwin 6, but allow the user to override it if they know what
they are doing?
Something like this.
Index: src/process.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/process.c,v
retrieving revision 1.447
diff -u -d -b -w -r1.447 process.c
--- src/process.c 27 Dec 2004 16:06:43 -0000 1.447
+++ src/process.c 21 Jan 2005 19:38:57 -0000
@@ -187,6 +187,7 @@
#include "syswait.h"
extern void set_waiting_for_input P_ ((EMACS_TIME *));
+extern char *get_operating_system_release ();
#ifndef USE_CRT_DLL
extern int errno;
@@ -6704,6 +6705,19 @@
Fprovide (intern ("make-network-process"), subfeatures);
}
#endif /* HAVE_SOCKETS */
+
+#ifdef DARWIN
+ /* PTYs are broken on Darwin < 6, but are sometimes useful for
interactive
+ processes. As such, we only change the default value. */
+ if (initialized)
+ {
+ char *release = get_operating_system_release();
+ if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION
+ && release[1] == '.')) {
+ Vprocess_connection_type = Qnil;
+ }
+ }
+#endif
}
void
Index: src/s/darwin.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/s/darwin.h,v
retrieving revision 1.19
diff -u -d -b -w -r1.19 darwin.h
--- src/s/darwin.h 20 Jan 2005 18:13:48 -0000 1.19
+++ src/s/darwin.h 21 Jan 2005 19:38:59 -0000
@@ -37,6 +37,10 @@
#define BSD_SYSTEM
/* #define VMS */
+#ifndef DARWIN
+#define DARWIN 1
+#endif
+
/* MAC_OS is used to conditionally compile code common to both MAC_OS8
and MAC_OSX. */
#ifdef MAC_OSX
@@ -103,25 +107,17 @@
/*
* Define HAVE_PTYS if the system supports pty devices.
+ * Note: PTYs are broken on darwin <6. Use at your own risk.
*/
#define HAVE_PTYS
-
-/*
- * PTYs only work correctly on Darwin 7 or higher. So make
PTY_ITERATION
- * Test the operating system release and only allow PTYs if it is
greater
- * than 7.
+/**
+ * PTYs only work correctly on Darwin 7 or higher. So make the
+ * default for process-connection-type dependent on the kernel
+ * version.
*/
#define MIN_PTY_KERNEL_VERSION '7'
-#define PTY_ITERATION \
- char *release = get_operating_system_release(); \
- if (!release || !release[0] || (release[0] < MIN_PTY_KERNEL_VERSION \
- && release[1] == '.')) \
- return -1; \
- for (c = FIRST_PTY_LETTER; c <= 'z'; c++) \
- for (i = 0; i < 16; i++)
-
/*
* Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
-Steven
On Jan 20, 2005, at 10:20 PM, Nozomu Ando wrote:
Steven Tamm <address@hidden> writes:
I changed mac-win.el to use ptys on darwin 7 and higher (i.e. OSX
10.3) based on this variable.
If my understanding is correct, we cannot use ptys at all on darwin 6
or below now?
Ptys on darwin 6 have the problem of data loss at the end of the
stream,
but they are still useful for interactive subprocesses, such as M-x
shell.
Moreover, we can fix the kernel of darwin 6 becuase its source is
available.
Could you please re-consider the last change and make it user's
selectable
that emacs should use ptys or not by setting process-connection-type ?
---
Nozomu Ando
_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel
- Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug, (continued)
Re: Emacs 21.3.50.1 (CVS sources) MacOS X tex-mode bug, Richard Stallman, 2005/01/18