[Mono-dev] Unix Signal in mono

Miguel de Icaza miguel at xamarin.com
Mon Feb 29 21:38:01 UTC 2016


Hey,

My bad, I should have said "kill", not "signal" to send messages to other
processes.

Miguel.


On Mon, Feb 29, 2016 at 1:33 PM, Jonathan Pryor <jonpryor at vt.edu> wrote:

> 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:
>
>         http://www.jprl.com/Blog/archive/development/mono/2008/Feb-08.html
>         http://docs.go-mono.com/?link=T%3aMono.Unix.UnixSignal
>         https://gist.github.com/jonpryor/1555261
>
> To *send* a signal, use Syscall.kill().
>
>  - Jon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20160229/f59912f9/attachment.html>


More information about the Mono-devel-list mailing list