unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* C-c C-c killing gdb on OS/X
@ 2003-11-21  1:43 John Wiegley
  2003-11-25 17:02 ` process-connection-type nil & gdb (was Re: C-c C-c killing gdb on OS/X) Steven Tamm
  0 siblings, 1 reply; 5+ messages in thread
From: John Wiegley @ 2003-11-21  1:43 UTC (permalink / raw)


To any of the Mac developers:

If I write a program that waits in a loop, and hit C-c C-c while in
gdb under gud, gdb will terminate with:

  C-c C-c
Debugger finished

But I do the same thing in the Terminal, it interrupts the program as
I expect.

Ideas?  I checked process.c, and it doesn't seem that anything is
being done differently for darwin.

John

^ permalink raw reply	[flat|nested] 5+ messages in thread

* process-connection-type nil & gdb (was Re: C-c C-c killing gdb on OS/X)
  2003-11-21  1:43 C-c C-c killing gdb on OS/X John Wiegley
@ 2003-11-25 17:02 ` Steven Tamm
  2003-11-25 20:05   ` process-connection-type nil & gdb Benjamin Riefenstahl
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Tamm @ 2003-11-25 17:02 UTC (permalink / raw)
  Cc: emacs-devel

I noticed this bug a while ago in the carbon port, and it works 
correctly with both X11 and the terminal emacs.  It has to do with the 
(setq process-connection-type nil) problem.  With X & the terminal the 
subprocesses are allocated with a pty, while with carbon they are 
allocated with pipes.  So if you (setq process-connection-type t), gdb 
will work; and if you (setq process-connection-type nil) in X11 and the 
terminal, it will fail and will probably fail on other platforms as 
well.  The "real bug" is that process-connection-type needs to be nil 
for darwin due to a bug in the pty implementation.

I'm not that familiar with the process code, nor with ptys, so I have 
no idea what is going wrong.  Can someone else look and figure out what 
the problem with interrupting gdb with pipes is?

Thanks,
-Steven

On Thursday, November 20, 2003, at 05:43  PM, John Wiegley wrote:

> To any of the Mac developers:
>
> If I write a program that waits in a loop, and hit C-c C-c while in
> gdb under gud, gdb will terminate with:
>
>   C-c C-c
> Debugger finished
>
> But I do the same thing in the Terminal, it interrupts the program as
> I expect.
>
> Ideas?  I checked process.c, and it doesn't seem that anything is
> being done differently for darwin.
>
> John
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process-connection-type nil & gdb
  2003-11-25 17:02 ` process-connection-type nil & gdb (was Re: C-c C-c killing gdb on OS/X) Steven Tamm
@ 2003-11-25 20:05   ` Benjamin Riefenstahl
  2003-11-26  3:24     ` Steven Tamm
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Riefenstahl @ 2003-11-25 20:05 UTC (permalink / raw)
  Cc: John Wiegley, emacs-devel

Hi Steven,


Steven Tamm <steventamm@mac.com> writes:
> I noticed this bug a while ago in the carbon port, and it works
> correctly with both X11 and the terminal emacs.  It has to do with
> the (setq process-connection-type nil) problem.

AFAIR, that was the work-around.  The problem was that ptys Mac OS X
didn't work right.  Andrew Choi said that this was probably fixed in
10.3 so that the work-around wasn't necessary any more.  See

  http://mail.gnu.org/archive/html/emacs-devel/2003-01/msg00756.html
  http://mail.gnu.org/archive/html/emacs-devel/2003-10/msg00818.html


benny

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process-connection-type nil & gdb
  2003-11-25 20:05   ` process-connection-type nil & gdb Benjamin Riefenstahl
@ 2003-11-26  3:24     ` Steven Tamm
  2003-11-26 14:22       ` Benjamin Riefenstahl
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Tamm @ 2003-11-26  3:24 UTC (permalink / raw)
  Cc: John Wiegley, emacs-devel

It is fixed in Panther and it probably makes sense to remove the (setq) 
from mac-win.el.   However, I'm still using Jaguar, and I still want 
the default to be nil so that my diffs don't get truncated.

I think a "better solution" would be to modify process.c to make the 
default for process_connection_type to be Qnil on darwin < 7.0.   It 
probably makes sense to add this in configure.in, but I'm not sure what 
is the most kosher way to do this.  Should it look at the canonical 
machine name and then for darwin<7 it will be set to Qnil and darwin>7 
to Qt?   Any comments would be appreciated.

Regardless, I think the problem with signaling across a pipe killing 
gdb is still a valid one.  If it is an inherent problem, that's fine 
with me, but it would be good to know why and put it in etc/PROBLEMS 
(unless .

-Steven

On Tuesday, November 25, 2003, at 12:05  PM, Benjamin Riefenstahl wrote:

> Hi Steven,
>
>
> Steven Tamm <steventamm@mac.com> writes:
>> I noticed this bug a while ago in the carbon port, and it works
>> correctly with both X11 and the terminal emacs.  It has to do with
>> the (setq process-connection-type nil) problem.
>
> AFAIR, that was the work-around.  The problem was that ptys Mac OS X
> didn't work right.  Andrew Choi said that this was probably fixed in
> 10.3 so that the work-around wasn't necessary any more.  See
>
>   http://mail.gnu.org/archive/html/emacs-devel/2003-01/msg00756.html
>   http://mail.gnu.org/archive/html/emacs-devel/2003-10/msg00818.html
>
>
> benny
>
>
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: process-connection-type nil & gdb
  2003-11-26  3:24     ` Steven Tamm
@ 2003-11-26 14:22       ` Benjamin Riefenstahl
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Riefenstahl @ 2003-11-26 14:22 UTC (permalink / raw)
  Cc: John Wiegley, emacs-devel

Hi Steven,


Steven Tamm <steventamm@mac.com> writes:

> It is fixed in Panther and it probably makes sense to remove the
> (setq) from mac-win.el.  However, I'm still using Jaguar, and I
> still want the default to be nil so that my diffs don't get
> truncated.
>
> I think a "better solution" would be to modify process.c to make the
> default for process_connection_type to be Qnil on darwin < 7.0.

It's probably more usefull to do this at runtime and in a segragated
source file like "mac-win.el", I think.  But a check of the current OS
version may be a good idea.

> Regardless, I think the problem with signaling across a pipe killing
> gdb is still a valid one.  If it is an inherent problem, that's fine
> with me, but it would be good to know why and put it in etc/PROBLEMS
> (unless .

I don't know anything about this, can't help you there. 


benny

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-11-26 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-21  1:43 C-c C-c killing gdb on OS/X John Wiegley
2003-11-25 17:02 ` process-connection-type nil & gdb (was Re: C-c C-c killing gdb on OS/X) Steven Tamm
2003-11-25 20:05   ` process-connection-type nil & gdb Benjamin Riefenstahl
2003-11-26  3:24     ` Steven Tamm
2003-11-26 14:22       ` Benjamin Riefenstahl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).