summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorSteven Tamm <steventamm@mac.com>2005-01-22 15:54:04 +0000
committerSteven Tamm <steventamm@mac.com>2005-01-22 15:54:04 +0000
commitd9e7c622607bc74214ad5f9aa0eaa64d7a4eba55 (patch)
treea0d4b82e7cdc64801379e5ae3431b9eff6785e73 /src/process.c
parent3d4d788a38060b1bb2435a57876d4065eb005b5b (diff)
downloademacs-d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55.tar.gz
emacs-d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55.tar.bz2
emacs-d9e7c622607bc74214ad5f9aa0eaa64d7a4eba55.zip
* s/darwin.h: Removed PTY_ITERATION from here.
(DARWIN): Defined. * process.c (init_process): Default process-connection-type to nil on darwin 6 or less, t if it is 7 or higher. This way the broken pty behavior is still allowed on darwin 6 for interactive processes for people that know what they are doing.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c
index 6134d3131bc..9b8b086ec7e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -187,6 +187,7 @@ extern Lisp_Object QCfilter;
#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 @@ init_process ()
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