# Receiving signals in Win32/Process

**URL:** <https://www.ruby-forum.com/t/receiving-signals-in-win32-process/85462>\
**Category:** Ruby\
**Created:** [February 13, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/receiving-signals-in-win32-process/85462 "2007-02-13T21:06:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![soroe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@soroe](https://www.ruby-forum.com/u/soroe)\
**Post date:** [February 13, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/receiving-signals-in-win32-process/85462/1 "2007-02-13T21:06:59Z")

</div>

Hey Guys,

I’ve created some Window’s processes uing the Win32/Process (by Daniel  
Berger) library. When I send a signal to these processes using  
Win32/Process.kill([1,3…9], pid), the processes are always killed.  
I’ve tried trapping for the signal using both a rescue and Signal.trap()  
clause with no luck.

I know that the Unix versions of the Process library allow you to  
capture the signal with a rescue clause for either SignalException or  
Interrupt Exceptions. Anyone know if the Win32/Process implements  
similar behavior for signals or failing that if anyone has a workaround.

Sonny.

---

<div class="post-metadata">

**Author:** ![soroe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f9ae1b/32.png) [@soroe](https://www.ruby-forum.com/u/soroe)\
**Post date:** [March 12, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/receiving-signals-in-win32-process/85462/2 "2007-03-12T20:31:33Z")

</div>

Only the following signals are supported.

_SIGABRT_ Abnormal termination _SIGFPE_ Floating-point error _SIGILL_  
Illegal  
instruction _SIGINT_ CTRL+C signal _SIGSEGV_ Illegal storage access  
\*SIGTERM

- Termination request  
You can try using the cygwin or mingw version of command line signals,  
but I  
am not sure if they solve your problem. Unlike in \*nix it is better not  
to  
use signals for process communication on windows platform. It is better  
to  
use pipes/sockets/events.
