From: Daniel Jacobowitz <drow@false.org>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] The gcore command hangs without a terminal
Date: Tue, 27 Mar 2007 16:44:00 -0000 [thread overview]
Message-ID: <20070327164407.GF3452@caradoc.them.org> (raw)
In-Reply-To: <20070327163915.GA4742@host0.dyn.jankratochvil.net>
On Tue, Mar 27, 2007 at 06:39:16PM +0200, Jan Kratochvil wrote:
> > Unfortunately I think this is the wrong place to fix it. You're
> > commenting out a call to target_terminal_inferior, but there are lots
> > of other calls to this function - including one any time we continue
> > the program.
>
> If we `continue' the inferior it may access its terminal and so we must set it
> up for the inferior. It is right there. But the `gcore' command IMO does not
> need to access the inferior's terminal as it never lets the inferior to run.
> Accessing the inferior's terminal should be postponed to the time where the
> inferior could use it.
If we attach to a program, it should have its own controlling
terminal, not the same as GDB's. So why should we do anything with
the terminal at all? Perhaps all the terminal operations should be
suppressed if we're attached.
> > target_terminal_inferior is a call eventually to terminal_inferior.
> > This checks gdb_has_a_terminal (). How are you calling GDB without a
> > controlling terminal that still lets gdb_has_a_terminal () return
> > true? That's probably the right place to fix it.
>
> You are right there is primarily a bug in the customer's application (which
> spawns the `gcore' command). It should either provide no terminal or
> a terminal with appropriate access rights.
An alternative would be to detect whatever had gone wrong in GDB and
avoid fiddling with the terminal if this happens.
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2007-03-27 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-25 12:26 Jan Kratochvil
2007-03-27 16:21 ` Daniel Jacobowitz
2007-03-27 16:40 ` Jan Kratochvil
2007-03-27 16:44 ` Daniel Jacobowitz [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070327164407.GF3452@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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