module Sys = struct ... end
Exceptions | |
Break |
Exception raised on interactive interrupt if catch_break
is on. |
Simple values | |
argv |
string array The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program. |
interactive |
bool Pervasives.ref This reference is initially set to false in standalone
programs and to true if the code is being executed under
the interactive toplevel system ocaml . |
os_type |
string Operating system currently executing the Caml program. One of "Unix" , "Win32" , "Cygwin" or "MacOS" . |
word_size |
int Size of one word on the machine currently executing the Caml program, in bits: 32 or 64. |
max_string_length |
int Maximum length of a string. |
max_array_length |
int Maximum length of an array. |
sigabrt |
int Abnormal termination |
sigalrm |
int Timeout |
sigfpe |
int Arithmetic exception |
sighup |
int Hangup on controlling terminal |
sigill |
int Invalid hardware instruction |
sigint |
int Interactive interrupt (ctrl-C) |
sigkill |
int Termination (cannot be ignored) |
sigpipe |
int Broken pipe |
sigquit |
int Interactive termination |
sigsegv |
int Invalid memory reference |
sigterm |
int Termination |
sigusr1 |
int Application-defined signal 1 |
sigusr2 |
int Application-defined signal 2 |
sigchld |
int Child process terminated |
sigcont |
int Continue |
sigstop |
int Stop |
sigtstp |
int Interactive stop |
sigttin |
int Terminal read from background process |
sigttou |
int Terminal write from background process |
sigvtalrm |
int Timeout in virtual time |
sigprof |
int Profiling interrupt |
Functions |
file_exists
: string -> bool |
remove
: string -> unit |
rename
: src:string -> dst:string -> unit |
getenv
: string -> string |
Not_found
if the variable is unbound.
command
: string -> int |
time
: unit -> float |
chdir
: string -> unit |
getcwd
: unit -> string |
signal
: int -> signal_behavior -> signal_behavior |
set_signal
: int -> signal_behavior -> unit |
signal
but return value is ignored.
catch_break
: bool -> unit |
catch_break
governs whether interactive interrupt (ctrl-C)
terminates the program or raises the Break
exception.
Call catch_break true
to enable raising Break
,
and catch_break false
to let the system
terminate the program on user interrupt.