Catching Break?

From: Ian T Zimmerman (
Date: Mon Jan 25 1999 - 19:43:01 MET

Date: Mon, 25 Jan 1999 10:43:01 -0800
Message-Id: <>
From: Ian T Zimmerman <>
Subject: Catching Break?

Why doesn't this work:

let main() =
  Sys.catch_break true;
  try Unix.kill (Unix.getpid()) Sys.sigint
  with Sys.Break -> prerr_endline "CAUGHT!"; exit 0

let _ = main()

This program just prints "Fatal error: Uncaught exception Sys.Break"
as if the try block weren't there. Am I overlooking something really

Ocaml 2.01, Unix (Linux 2.0), libc5, linuxthreads.

Ian T Zimmerman                        <>
I came to the conclusion that what was wrong about the guillotine
was that the condemned man had no chance at all, absolutely none.
Albert Camus, _The Outsider_

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:18 MET