Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Paul N. Hilfinger" <hilfingr@otisco.mckusick.com>
To: msnyder@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] lin-lwp.c change to avoid obscure hanging
Date: Wed, 17 Apr 2002 02:52:00 -0000	[thread overview]
Message-ID: <200204170952.CAA17455@otisco.McKusick.COM> (raw)
In-Reply-To: <3CBB7717.B7772E4A@redhat.com> (message from Michael Snyder on Mon, 15 Apr 2002 17:57:59 -0700)


> > 3. The user executes the commands
> >      delete
> >      thread B
> >      continue

> This isn't really a sensable thing to do anyway.
> Probably the user is imagining that this will cause
> thread B to be treated in some way specially (eg. 
> resumed before the others), but it will not
> (or at least it should not).

Oh, I'm SO glad you brought this up, because it is a point that could stand 
clarification.  

Q1. Consider the following sequence (user input preceded by prompts)

	  (gdb) run
	  ...
	  Breakpoint 1, philosopher ...
	  (gdb) info thread
          * 7 Thread 5126 (runnable) ...
	  ...
	  (gdb) thread 6   # I.e., Some thread other than the current one
	  (gdb) signal 1

     What is supposed to happen?  What DOES happen (on Linux) is that thread 7 
     receives SIGHUP.

Q2. Now consider what happens when one thread is sent an asynchronous SIGHUP
    (on Linux, there are kernel threads, and you can address a signal to
    a specific thread from the command line with the kill command).

          (gdb) run
	  ...
	  Program received signal SIGHUP, Hangup.
	  ...
	  (gdb) info thread
          * 7 Thread 5126 (runnable) ...
	  ...
	  (gdb) thread 6
	  (gdb) cont

     Here what happens is that thread *6* receives SIGHUP.

Q3.  Finally, we have

          (gdb) run
	  ...
	  Program received signal SIGHUP, Hangup.
	  ...
	  (gdb) info thread
          * 7 Thread 5126 (runnable) ...
	  ...
	  (gdb) thread 6
	  (gdb) signal 1

     Again, thread 6 receives SIGHUP.

Question: How much of this, if any, is intentional?  What should happen in
these cases?

Paul Hilfinger


  reply	other threads:[~2002-04-17  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12 12:43 [RFA] Change to parse error reporting Michael Snyder
2002-04-13  2:05 ` [RFA] lin-lwp.c change to avoid obscure hanging Paul N. Hilfinger
2002-04-15 18:10   ` Michael Snyder
2002-04-17  2:52     ` Paul N. Hilfinger [this message]
2002-04-19 11:53       ` Michael Snyder
2002-04-19 11:54 ` [RFA] Change to parse error reporting Michael Snyder
2002-04-24 15:23   ` Michael Snyder

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=200204170952.CAA17455@otisco.McKusick.COM \
    --to=hilfingr@otisco.mckusick.com \
    --cc=Hilfinger@otisco.mckusick.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=msnyder@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