Merge pull request #1967 from D-POWER/master
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / UnixProcess.cs
index 98f64c83bfe6ca575de78e595ff4ab886eeb124b..3360ef25fe97ad4ed25660646eb8517d73ba95ce 100644 (file)
@@ -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);
                }