This is the mail archive of the
frysk@sourceware.org
mailing list for the frysk project.
Re: How to send signals to test programs?
- From: Mark Wielaard <mark at klomp dot org>
- To: Nurdin Premji <npremji at redhat dot com>
- Cc: frysk <frysk at sourceware dot org>
- Date: Wed, 26 Mar 2008 13:36:16 +0100
- Subject: Re: How to send signals to test programs?
- References: <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