public UnixSignal(Mono.Unix.Native.Signum signum) { this.signum = NativeConvert.FromSignum(signum); this.signal_info = UnixSignal.install(this.signum); if (this.signal_info == IntPtr.Zero) { throw new ArgumentException("Unable to handle signal", "signum"); } }
public UnixSignal(Mono.Unix.Native.RealTimeSignum rtsig) { this.signum = NativeConvert.FromRealTimeSignum(rtsig); this.signal_info = UnixSignal.install(this.signum); Errno lastError = Stdlib.GetLastError(); if (this.signal_info == IntPtr.Zero) { if (lastError != Errno.EADDRINUSE) { throw new ArgumentException("Unable to handle signal", "signum"); } throw new ArgumentException("Signal registered outside of Mono.Posix", "signum"); } }