public inbox for
 help / color / mirror / Atom feed
From: Kevin Buettner <>
Subject: [PATCH] Force rda (for unix) to exit when debugged program exits
Date: Tue, 20 Jul 2004 00:48:00 -0000	[thread overview]
Message-ID: <20040719174802.3820027f@saguaro> (raw)

I've just committed the patch below.  I found this patch necessary to
make RDA exit when debugging via a serial connection upon which CLOCAL
had been set.  CLOCAL causes the hardware modem control signals to be
ignored.  As a consequence, the serial port will always appear to
be open.

	* server.c (main): Set ``server_quit_p'' when debugged process
	exits or terminates.

Index: server.c
RCS file: /cvs/src/src/rda/unix/server.c,v
retrieving revision 1.6
diff -u -p -r1.6 server.c
--- server.c	3 Jun 2004 18:29:18 -0000	1.6
+++ server.c	20 Jul 2004 00:41:10 -0000
@@ -415,9 +415,17 @@ main (int argc, char **argv)
 	      case 'X':
 		gdbserver.fromtarget_terminate (process);
+		server_quit_p = 1;		/* See below.  */
 	      case 'W':
 		gdbserver.fromtarget_exit (process);
+		/* If we're connected to a serial port which is not
+		   observing the modem control signals (e.g. "stty
+		   clocal"), then we'll never notice that the port has
+		   been closed.  For this reason, when we notice that
+		   the target has exited or terminated, we need to set
+		   ``server_quit_p'' explicitly.  */
+		server_quit_p = 1;

                 reply	other threads:[~2004-07-20  0:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040719174802.3820027f@saguaro \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).