Mono Class Library: Mono.Posix.Syscall Overview | MembersMono.Posix.Syscall.exit Method |
Terminates the process that calls the function with the status 'status'. [Edit]
|
a int [Edit]
This member is obsolete. Please use Mono.Unix.Native.Syscall.exit instead.
[Edit]
C# Example using System; using Mono.Posix; using System.Runtime.InteropServices; class Test { public void SignalCatcher(int v) { // sleep signal caught. Console.WriteLine("Signal received: " + v); // this line will not be printed because process exits... Console.WriteLine("Exiting with: " + Syscall.exit(9)); } public static void Main(string[] args) { Test t = new Test(); Console.Write("waiting for event..."); string x = Console.ReadLine(); } public Test() { // create a signal handler delegate for sleep signals Console.WriteLine("signal result: " + Syscall.signal(14, new Syscall.sighandler_t(SignalCatcher))); // send a sleep signal Syscall.alarm(3); } }
Namespace: Mono.Posix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0