Re: [Mono-dev] Unix Signal in mono
Thanks. I am able to use signal between process!!! On Mon, Feb 29, 2016 at 9:33 PM, Jonathan Pryorwrote: > On Feb 29, 2016, at 8:18 AM, techi eth 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 > > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
On Feb 29, 2016, at 8:18 AM, techi ethwrote: > 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 ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
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 Pryorwrote: > On Feb 29, 2016, at 8:18 AM, techi eth 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 > > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
> From: mono-devel-list-boun...@lists.ximian.com [mailto:mono-devel-list- > boun...@lists.ximian.com] On Behalf Of techi eth > > 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. Start with http://mono-project.com Documentation > Getting Started > Overview > API Reference And this should do it for you: http://docs.go-mono.com/?link=M%3aMono.Unix.Native.Syscall.kill(System.Int32%2cMono.Unix.Native.Signum) ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
Hi, In that case, you want the kill () function, which is also provided by Mono.Posix. Regards, Alex On Mon, Feb 29, 2016 at 2:18 PM, techi ethwrote: > 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. > > On Mon, Feb 29, 2016 at 1:11 PM, Miguel de Icaza wrote: >> >> You call the "signal" API. >> >> Mono wraps that conveniently for you in the Mono.Posix assembly: >> >> Mono.Unix.Native.Stdlib.signal >> >> >> Miguel >> >> >> On Mon, Feb 29, 2016 at 7:45 AM, techi eth wrote: >>> >>> Hi, >>> >>> What is the way by which one process can send Unix Signal to another >>> process. >>> >>> Thanks >>> >>> Techi >>> >>> >>> ___ >>> Mono-devel-list mailing list >>> Mono-devel-list@lists.ximian.com >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list >>> >> > > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
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. On Mon, Feb 29, 2016 at 1:11 PM, Miguel de Icazawrote: > You call the "signal" API. > > Mono wraps that conveniently for you in the Mono.Posix assembly: > > Mono.Unix.Native.Stdlib.signal > > > Miguel > > On Mon, Feb 29, 2016 at 7:45 AM, techi eth wrote: > >> Hi, >> >> What is the way by which one process can send Unix Signal to another >> process. >> >> Thanks >> >> Techi >> >> >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list >> >> > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal in mono
You call the "signal" API. Mono wraps that conveniently for you in the Mono.Posix assembly: Mono.Unix.Native.Stdlib.signal Miguel On Mon, Feb 29, 2016 at 7:45 AM, techi ethwrote: > Hi, > > What is the way by which one process can send Unix Signal to another > process. > > Thanks > > Techi > > > ___ > Mono-devel-list mailing list > Mono-devel-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-devel-list > > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Unix Signal in mono
Hi, What is the way by which one process can send Unix Signal to another process. Thanks Techi ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Unix Signal with mono
On 01/17/2016 04:05 PM, techi eth wrote: How can i use Unix signal while using mono ? https://github.com/mono/mono/blob/master/mcs/class/Mono.Posix/Mono.Unix/UnixSignal.cs ? ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Unix Signal with mono
Hi, How can i use Unix signal while using mono ? Techi ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list