public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Craig Jeffree <craig.jeffree@preston.net>
To: gdb@sources.redhat.com
Subject: gdb gets suspended during debugging
Date: Mon, 12 Sep 2005 04:51:00 -0000	[thread overview]
Message-ID: <1126500703.25254.134.camel@norman> (raw)

Hi everyone,

I've discovered that GDB will get suspended/backgrounded when debugging
if it produces a terminal height worth of the "Detaching after fork from
child process..." messages.

This only occurs the first time the terminal fills up and you can simply
'fg' the debugger back to the foreground and it will continue without
any problems.  You can also work around it by doing 'set height 0' in
gdb as this prevents it from prompting when the terminal fills up.

I couldn't find any bugs regarding this in the database, only an
unanswered message in a mailing list somewhere.  Has anyone else seen
this before?  It is a bug isn't it?  Is there a better fix/workaround so
that I can keep my value for height untouched and not have to 'fg' the
debugger?

I've seen this with gdb 6.2 and 6.3, I compiled the example below with
gcc 3.2.3 and it occurs with both bash and tcsh.  I've only tested it
under RHEL3 & 4.

To see it for yourselves run this in GDB:
#include <unistd.h>

int main()
{
    while(1)
    {
        if (!fork())
            exit(1);

        sleep(1);
    }
}


Cheers,
Craig.

             reply	other threads:[~2005-09-12  4:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12  4:51 Craig Jeffree [this message]
2005-09-12 12:39 ` Daniel Jacobowitz

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=1126500703.25254.134.camel@norman \
    --to=craig.jeffree@preston.net \
    --cc=gdb@sources.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).