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;
}
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);
}
}
public bool HasStopped {
get {
int status = GetProcessStatus ();
- return Syscall.WIFSTOPPED (status);
+ return Native.Syscall.WIFSTOPPED (status);
}
}
}
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;
}
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)]
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);
}