private static void setupSignals() throws NativeCallException {
    LibC libc = checkLibc();

    Memory sigset = new Memory(LibCConstants.MAX_SIZEOF_SIGSET_T);
    if (libc.sigfillset(sigset) == -1) {
      throw libcCallError("sigfillset");
    }
    if (libc.sigprocmask(LibCConstants.SIG_UNBLOCK, sigset, Pointer.NULL) == -1) {
      throw libcCallError("sigprocmask");
    }

    tryResetSignal(LibCConstants.SIGHUP, "SIGHUP");
    tryResetSignal(LibCConstants.SIGINT, "SIGINT");
    tryResetSignal(LibCConstants.SIGQUIT, "SIGQUIT");
    tryResetSignal(LibCConstants.SIGILL, "SIGILL");
    tryResetSignal(LibCConstants.SIGTRAP, "SIGTRAP");
    tryResetSignal(LibCConstants.SIGABRT, "SIGABRT");
    tryResetSignal(LibCConstants.SIGFPE, "SIGFPE");
    tryResetSignal(LibCConstants.SIGSEGV, "SIGSEGV");
    tryResetSignal(LibCConstants.SIGPIPE, "SIGPIPE");
    tryResetSignal(LibCConstants.SIGALRM, "SIGALRM");
    tryResetSignal(LibCConstants.SIGTERM, "SIGTERM");
  }
private static void setupSignals()