[Mono-dev] Unix Signal in mono

Jonathan Pryor jonpryor at vt.edu
Mon Feb 29 21:33:59 UTC 2016

On Feb 29, 2016, at 8:18 AM, techi eth <techieth at gmail.com> wrote:
> Thanks for quick hint.
> We can receive signal by using signal handler using Mono.Unix.Native.Stdlib.signal.
> I am trying to check possibility of sending signal from one process to another.
> Example : If i have two process (P1 & P2) & P1 want to send SIGTERM to P2.

Don’t use Stdlib.signal() to setup signal handlers. It’s [Obsolete] because it isn’t signal safe, i.e. it isn’t safe to invoke managed code from within a signal handler.

Instead, to receive a notification of signal delivery, you should use UnixSignal:


To *send* a signal, use Syscall.kill().

 - Jon

More information about the Mono-devel-list mailing list