X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FMono.Posix%2FMono.Unix%2FUnixProcess.cs;h=3360ef25fe97ad4ed25660646eb8517d73ba95ce;hb=714feff880e328447caa20e6eb07d700f67480c0;hp=98f64c83bfe6ca575de78e595ff4ab886eeb124b;hpb=f73e0d5c67f0d26e85b92fc4b75fc48783f20d64;p=mono.git diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs index 98f64c83bfe..3360ef25fe9 100644 --- a/mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs +++ b/mcs/class/Mono.Posix/Mono.Unix/UnixProcess.cs @@ -47,15 +47,15 @@ namespace Mono.Unix { public bool HasExited { get { int status = GetProcessStatus (); - return Syscall.WIFEXITED (status); + return Native.Syscall.WIFEXITED (status); } } private int GetProcessStatus () { int status; - int r = Syscall.waitpid (pid, out status, - WaitOptions.WNOHANG | WaitOptions.WUNTRACED); + int r = Native.Syscall.waitpid (pid, out status, + Native.WaitOptions.WNOHANG | Native.WaitOptions.WUNTRACED); UnixMarshal.ThrowExceptionForLastErrorIf (r); return r; } @@ -66,14 +66,14 @@ namespace Mono.Unix { throw new InvalidOperationException ( Locale.GetText ("Process hasn't exited")); int status = GetProcessStatus (); - return Syscall.WEXITSTATUS (status); + return Native.Syscall.WEXITSTATUS (status); } } public bool HasSignaled { get { int status = GetProcessStatus (); - return Syscall.WIFSIGNALED (status); + return Native.Syscall.WIFSIGNALED (status); } } @@ -90,7 +90,7 @@ namespace Mono.Unix { public bool HasStopped { get { int status = GetProcessStatus (); - return Syscall.WIFSTOPPED (status); + return Native.Syscall.WIFSTOPPED (status); } } @@ -105,16 +105,16 @@ namespace Mono.Unix { } public int ProcessGroupId { - get {return Syscall.getpgid (pid);} + get {return Native.Syscall.getpgid (pid);} set { - int r = Syscall.setpgid (pid, value); + int r = Native.Syscall.setpgid (pid, value); UnixMarshal.ThrowExceptionForLastErrorIf (r); } } public int SessionId { get { - int r = Syscall.getsid (pid); + int r = Native.Syscall.getsid (pid); UnixMarshal.ThrowExceptionForLastErrorIf (r); return r; } @@ -127,20 +127,12 @@ namespace Mono.Unix { public static int GetCurrentProcessId () { - return Syscall.getpid (); + return Native.Syscall.getpid (); } public void Kill () { - Signal (Signum.SIGKILL); - } - - [CLSCompliant (false)] - [Obsolete ("Use Signal (Mono.Unix.Native.Signum)")] - public void Signal (Signum signal) - { - int r = Syscall.kill (pid, signal); - UnixMarshal.ThrowExceptionForLastErrorIf (r); + Signal (Native.Signum.SIGKILL); } [CLSCompliant (false)] @@ -155,7 +147,7 @@ namespace Mono.Unix { int status; int r; do { - r = Syscall.waitpid (pid, out status, (WaitOptions) 0); + r = Native.Syscall.waitpid (pid, out status, (Native.WaitOptions) 0); } while (UnixMarshal.ShouldRetrySyscall (r)); UnixMarshal.ThrowExceptionForLastErrorIf (r); }