public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: frysk@sourceware.org, npremji@sourceware.org
Subject: Re: frysk-core/frysk/proc LinuxTask.java TestProcS ...
Date: Wed, 11 Oct 2006 22:33:00 -0000	[thread overview]
Message-ID: <452D7143.6050804@redhat.com> (raw)
In-Reply-To: <1160601989.3025.25.camel@dijkstra.wildebeest.org>

Mark Wielaard wrote:
> Aha. So we are trying to trick our own waitpid() into thinking it
> received a new SIGCHLD event? But aren't we actually waiting for a
> SIGSTOP from the child after an ptrace attach?
>
>   
A waitpid doesn not receive a SIGCHLD event, rather the arrival of a 
waitpid event normally leads to the controlling process being sent a 
SIGCHLD.

Nurden's patch, which is simple and elegant, fudges the case of SIGCHLD 
not being sent by sending one anyway.

Andrew

> Is sending the signal to our calling Thread as good as sending to any
> other Thread in our frysk process? I am slightly surprised that the
> signal arrives in a way that waitpid() is detecting it, since this isn't
> a real SIGCHLD/SIGSTOP signal from the task we want to attach to. How
> precisely does this work?
>
> Cheers,
>
> Mark
>
>   

  parent reply	other threads:[~2006-10-11 22:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061011195727.26918.qmail@sourceware.org>
2006-10-11 20:13 ` Mark Wielaard
2006-10-11 20:57   ` Andrew Cagney
2006-10-11 21:26     ` Mark Wielaard
2006-10-11 21:39       ` Nurdin Premji
2006-10-11 22:33       ` Andrew Cagney [this message]
2006-10-12  9:17         ` Mark Wielaard

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=452D7143.6050804@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=mark@klomp.org \
    --cc=npremji@sourceware.org \
    /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).