* 23.0.60; OSX: isatty
@ 2007-11-16 21:31 Markus Triska
2007-11-16 22:22 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Markus Triska @ 2007-11-16 21:31 UTC (permalink / raw)
To: emacs-pretest-bug
This narrows down the report regarding accept-process-output a bit: I've
built Emacs CVS against X11 only (no Carbon) on OSX 10.4.10. The
following C program provides a simple test case:
#include <stdio.h>
#include <unistd.h>
int main() { printf("isatty(stdin): %d\n", isatty(fileno(stdin)));
fflush(stdout); return 0; }
When I run this program from within Emacs with M-x comint-run, I get
different outputs in the buffer, depending on the Emacs version:
*) Before multi-tty merge:
isatty(stdin): 1
*) After multi-tty merge (current CVS):
isatty(stdin): 0
For this reason, some programs stop showing prompts. M-x shell, for
example, does not show any prompt, but the (bash) shell is there, and I
can enter and execute commands in the buffer.
In GNU Emacs 23.0.60.1 (i386-apple-darwin8.10.1, X toolkit)
of 2007-11-12 on mt-computer.local
Windowing system distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--without-carbon' '--with-x' '--without-gif' '--without-tiff' '--enable-font-backend' 'LIBS=-lresolv''
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 23.0.60; OSX: isatty
2007-11-16 21:31 23.0.60; OSX: isatty Markus Triska
@ 2007-11-16 22:22 ` Stefan Monnier
2007-11-16 22:22 ` Markus Triska
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-11-16 22:22 UTC (permalink / raw)
To: Markus Triska; +Cc: emacs-pretest-bug
> This narrows down the report regarding accept-process-output a bit: I've
> built Emacs CVS against X11 only (no Carbon) on OSX 10.4.10. The
> following C program provides a simple test case:
> #include <stdio.h>
> #include <unistd.h>
> int main() { printf("isatty(stdin): %d\n", isatty(fileno(stdin)));
> fflush(stdout); return 0; }
> When I run this program from within Emacs with M-x comint-run, I get
> different outputs in the buffer, depending on the Emacs version:
> *) Before multi-tty merge:
> isatty(stdin): 1
> *) After multi-tty merge (current CVS):
> isatty(stdin): 0
> For this reason, some programs stop showing prompts. M-x shell, for
> example, does not show any prompt, but the (bash) shell is there, and I
> can enter and execute commands in the buffer.
What's the value of `process-connection-type'?
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 23.0.60; OSX: isatty
2007-11-16 22:22 ` Stefan Monnier
@ 2007-11-16 22:22 ` Markus Triska
2007-11-17 4:26 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Markus Triska @ 2007-11-16 22:22 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-pretest-bug
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> What's the value of `process-connection-type'?
It is nil by default (emacs -q). Manually setting it to t seems to
make everything work. Thank you very much!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 23.0.60; OSX: isatty
2007-11-16 22:22 ` Markus Triska
@ 2007-11-17 4:26 ` Stefan Monnier
2007-11-17 11:07 ` Markus Triska
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Stefan Monnier @ 2007-11-17 4:26 UTC (permalink / raw)
To: Markus Triska; +Cc: emacs-pretest-bug
>> What's the value of `process-connection-type'?
> It is nil by default (emacs -q).
Please try it with "emacs -Q". If it's still nil, then try and figure
where this is coming from.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 23.0.60; OSX: isatty
2007-11-17 4:26 ` Stefan Monnier
@ 2007-11-17 11:07 ` Markus Triska
2007-11-17 15:27 ` Markus Triska
2007-11-19 10:17 ` [patch] " Markus Triska
2 siblings, 0 replies; 8+ messages in thread
From: Markus Triska @ 2007-11-17 11:07 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-pretest-bug
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Please try it with "emacs -Q". If it's still nil, then try and figure
> where this is coming from.
It also happens with -Q. It's from init_process (process.c, l. 7152ff):
#if defined (DARWIN) || defined (MAC_OSX)
/* 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
This is executed before init_editfns has had a chance to initialize
Voperating_system_release (MAC_OSX is defined on my platform).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: 23.0.60; OSX: isatty
2007-11-17 4:26 ` Stefan Monnier
2007-11-17 11:07 ` Markus Triska
@ 2007-11-17 15:27 ` Markus Triska
2007-11-19 10:17 ` [patch] " Markus Triska
2 siblings, 0 replies; 8+ messages in thread
From: Markus Triska @ 2007-11-17 15:27 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-pretest-bug
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> figure where this is coming from.
For completeness, this is the relevant commit:
commit 6c194ef1b42ba72670dbfaa82b7eacffbf22e2d4
Author: Karoly Lorentey <lorentey@elte.hu>
Date: Mon Mar 29 12:05:03 2004 +0000
Fix initialization order at bootstrap (Dan Nicolaescu).
src/emacs.c (main): Call init_process before init_display to prevent
losing the keyboard on stdin (reported by Dan Nicolaescu).
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-128
diff --git a/src/emacs.c b/src/emacs.c
index 43d2f85..1c7d595 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1578,6 +1578,7 @@ main (argc, argv
#endif /* end #ifdef HAVE_NTGUI */
}
+ init_process (); /* init_display uses add_keyboard_wait_descriptor. */
#ifndef MAC_OS8
/* Called before init_window_once for Mac OS Classic. */
init_keyboard (); /* This too must precede init_sys_modes. */
@@ -1604,7 +1605,6 @@ main (argc, argv
#ifdef VMS
init_vmsfns ();
#endif /* VMS */
- init_process ();
#ifdef HAVE_SOUND
init_sound ();
#endif
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [patch] Re: 23.0.60; OSX: isatty
2007-11-17 4:26 ` Stefan Monnier
2007-11-17 11:07 ` Markus Triska
2007-11-17 15:27 ` Markus Triska
@ 2007-11-19 10:17 ` Markus Triska
2007-11-23 4:18 ` Stefan Monnier
2 siblings, 1 reply; 8+ messages in thread
From: Markus Triska @ 2007-11-19 10:17 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-pretest-bug
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> where this is coming from.
The following patch closes the issue.
2007-11-19 Markus Triska <markus.triska@gmx.at>
* emacs.c (main): call init_editfns before init_process, since
init_process sets Vprocess_connection_type depending on OS release
diff --git a/src/emacs.c b/src/emacs.c
index 8a51b8c..af6a7b7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1666,6 +1666,7 @@ main (argc, argv
#endif /* HAVE_NTGUI */
}
+ init_editfns (); /* init_process uses Voperating_system_release. */
init_process (); /* init_display uses add_keyboard_wait_descriptor. */
#ifndef MAC_OS8
/* Called before init_window_once for Mac OS Classic. */
@@ -1688,7 +1689,6 @@ main (argc, argv
init_image ();
#endif /* HAVE_WINDOW_SYSTEM */
init_macros ();
- init_editfns ();
init_floatfns ();
#ifdef VMS
init_vmsfns ();
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [patch] Re: 23.0.60; OSX: isatty
2007-11-19 10:17 ` [patch] " Markus Triska
@ 2007-11-23 4:18 ` Stefan Monnier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2007-11-23 4:18 UTC (permalink / raw)
To: Markus Triska; +Cc: emacs-pretest-bug
> The following patch closes the issue.
> 2007-11-19 Markus Triska <markus.triska@gmx.at>
> * emacs.c (main): call init_editfns before init_process, since
> init_process sets Vprocess_connection_type depending on OS release
Installed. Thanks for your help. Sorry for the delay,
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-11-23 4:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-16 21:31 23.0.60; OSX: isatty Markus Triska
2007-11-16 22:22 ` Stefan Monnier
2007-11-16 22:22 ` Markus Triska
2007-11-17 4:26 ` Stefan Monnier
2007-11-17 11:07 ` Markus Triska
2007-11-17 15:27 ` Markus Triska
2007-11-19 10:17 ` [patch] " Markus Triska
2007-11-23 4:18 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.