Beispiel #1
0
        // convert a realtime signal to os signal
        public static int FromRealTimeSignum(RealTimeSignum sig)
        {
            int sigNum;

            if (FromRealTimeSignum(sig.Offset, out sigNum) == -1)
            {
                ThrowArgumentException(sig.Offset);
            }
            return(sigNum);
        }
Beispiel #2
0
 public UnixSignal(Mono.Unix.Native.RealTimeSignum rtsig)
 {
     signum           = NativeConvert.FromRealTimeSignum(rtsig);
     this.signal_info = install(this.signum);
     Native.Errno err = Native.Stdlib.GetLastError();
     if (this.signal_info == IntPtr.Zero)
     {
         if (err == Native.Errno.EADDRINUSE)
         {
             throw new ArgumentException("Signal registered outside of Mono.Posix", "signum");
         }
         throw new ArgumentException("Unable to handle signal", "signum");
     }
 }
Beispiel #3
0
 public static int raise(RealTimeSignum rts)
 {
     return(sys_raise(NativeConvert.FromRealTimeSignum(rts)));
 }
Beispiel #4
0
 public static int SetSignalAction(RealTimeSignum rts, SignalAction action)
 {
     return(SetSignalAction(NativeConvert.FromRealTimeSignum(rts), action));
 }