From: Mark Kettenis <kettenis@wins.uva.nl>
To: Nicolas Vignal <nicolas.vignal@netline.fr>
Cc: gdb@sources.redhat.com
Subject: Re: thread cannot stop himself
Date: Fri, 09 Feb 2001 03:36:00 -0000 [thread overview]
Message-ID: <s3i3ddom6l4.fsf@debye.wins.uva.nl> (raw)
In-Reply-To: <01020814582000.18700@nicolas>
Nicolas Vignal <nicolas.vignal@netline.fr> writes:
> Hello
>
> I join a sample program with a thread who try to stop himself with a
> SIGSTOP.
> ( I know that is not the best way to do that ;-)
> It works fine in command line but not under gdb.
> gdb receive the signal and the flag pass to program is yes. But the thread
> never stop.
>
> Any idea of what happened ?
GDB uses SIGSTOP internally (for stopping threads) which interferes
horribly with your own use of the signal. I'm loooking into a
solution, but things are pretty hairy, and I can't guarantee that I
find an acceptable solution to the problem.
For now, the only advice I can give you is: don't use SIGSTOP. I'm
not sure what you're trying to accomplish by having a thread stop
itself, but there should be an alternative to using signals. Try
using a mutex, semaphore or perhaps poll/select.
Mark
next parent reply other threads:[~2001-02-09 3:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <01020814582000.18700@nicolas>
2001-02-09 3:36 ` Mark Kettenis [this message]
2001-02-12 7:10 ` Nicolas Vignal
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=s3i3ddom6l4.fsf@debye.wins.uva.nl \
--to=kettenis@wins.uva.nl \
--cc=gdb@sources.redhat.com \
--cc=nicolas.vignal@netline.fr \
/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