install() private method

private install ( int signum ) : IntPtr
signum int
return System.IntPtr
示例#1
0
 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");
     }
 }
示例#2
0
        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");
            }
        }