public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Nurdin Premji <npremji@redhat.com>
Cc: frysk <frysk@sourceware.org>
Subject: Re: How to send signals to test programs?
Date: Wed, 26 Mar 2008 12:36:00 -0000	[thread overview]
Message-ID: <1206534976.3553.68.camel@dijkstra.wildebeest.org> (raw)
In-Reply-To: <47E9AA37.3080908@redhat.com>

Hi Nurdin,

On Tue, 2008-03-25 at 21:43 -0400, Nurdin Premji wrote:
> Trying to create a test for stepping over and through signals. I have a 
> simple the test program and I'm copying testcases from
> frysk-core/frysk/stepping/TestStepping.java
> 
> How do I send a signal to my test program from the TestStepping test?

You can deliver a signal through frysk.sys.Signal.[SIGNALNAME].kill(pid)
or tkill(tid) (don't confuse that class with frysk.isa.signal.Signal).
Note that you most likely also want to install an SignalObserver to
monitor when your signal arrives (there is no guarantee the signal gets
delivered immediately).

Another method would be to let the test program deliver itself a signal,
either through kill() or alarm()

Cheers,

Mark

  reply	other threads:[~2008-03-26 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26  1:43 Nurdin Premji
2008-03-26 12:36 ` Mark Wielaard [this message]
2008-03-26 13:32 ` Andrew Cagney

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=1206534976.3553.68.camel@dijkstra.wildebeest.org \
    --to=mark@klomp.org \
    --cc=frysk@sourceware.org \
    --cc=npremji@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).