src/Pure/System/command_line.ML
changeset 56630 d06c44532706
parent 56628 a2df9de46060
child 62470 9037ed690e19
equal deleted inserted replaced
56629:ca302c495bca 56630:d06c44532706
    16 fun tool body =
    16 fun tool body =
    17   uninterruptible (fn restore_attributes => fn () =>
    17   uninterruptible (fn restore_attributes => fn () =>
    18     let
    18     let
    19       val rc =
    19       val rc =
    20         restore_attributes body () handle exn =>
    20         restore_attributes body () handle exn =>
    21           Exn.capture_exit 1 (fn () => (Runtime.exn_error_message exn; raise exn)) ();
    21           Exn.capture_exit 2 (fn () => (Runtime.exn_error_message exn; raise exn)) ();
    22     in if rc = 0 then () else exit rc end) ();
    22     in if rc = 0 then () else exit rc end) ();
    23 
    23 
    24 fun tool0 body = tool (fn () => (body (); 0));
    24 fun tool0 body = tool (fn () => (body (); 0));
    25 
    25 
    26 end;
    26 end;