Source

amall / src / am_Sys.ml

Full commit
module Sys
 =
  struct

    include Sys;

    value names_of_signals =
      [ (sigabrt, "sigabrt")
      ; (sigalrm, "sigalrm")
      ; (sigfpe, "sigfpe")
      ; (sighup, "sighup")
      ; (sigill, "sigill")
      ; (sigint, "sigint")
      ; (sigkill, "sigkill")
      ; (sigpipe, "sigpipe")
      ; (sigquit, "sigquit")
      ; (sigsegv, "sigsegv")
      ; (sigterm, "sigterm")
      ; (sigusr1, "sigusr1")
      ; (sigusr2, "sigusr2")
      ; (sigchld, "sigchld")
      ; (sigcont, "sigcont")
      ; (sigstop, "sigstop")
      ; (sigtstp, "sigtstp")
      ; (sigttin, "sigttin")
      ; (sigttou, "sigttou")
      ; (sigvtalrm, "sigvtalrm")
      ; (sigprof, "sigprof")
      ]
    ;

    value name_of_signal n =
      try
        List.assoc n names_of_signals
      with
      [ Not_found -> Printf.sprintf "signal %i" n]
    ;

  end
;