Skip to content

Commit

Permalink
Document the effect of caml_startup on Unix signal handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierleroy committed Oct 29, 2021
1 parent 7803af0 commit df89f2a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions manual/src/cmds/intf-c.etex
Original file line number Diff line number Diff line change
Expand Up @@ -1727,8 +1727,8 @@ compilation of OCaml, as the variable "OC_LDFLAGS".
OCaml have been compiled with the "/MD" flag, and therefore
all other object files linked with it should also be compiled with
"/MD".
\item other systems: you may have to add one or more of "-lcurses",
"-lm", "-ldl", depending on your OS and C compiler.
\item other systems: you may have to add one or more of

This comment has been minimized.

Copy link
@dra27

dra27 Oct 29, 2021

Member

s/more/both

"-lm" and "-ldl", depending on your OS and C compiler.
\end{itemize}

\paragraph{Stack backtraces.} When OCaml bytecode produced by
Expand Down Expand Up @@ -1778,6 +1778,12 @@ Once a runtime is unloaded, it cannot be started up again without reloading the
shared library and reinitializing its static data. Therefore, at the moment, the
facility is only useful for building reloadable shared libraries.

\paragraph{Unix signal handling.} Depending on the target platform and
operating system, the native-code runtime system may install signal
handlers for one or several of the "SIGSEGV", "SIGTRAP" and "SIGFPE"
signals when "caml_startup" is called, and reset these signals to
their default behaviors when "caml_shutdown" is called. The main
program written in~C should not try to handle these signals itself.

\section{s:c-advexample}{Advanced example with callbacks}

Expand Down

0 comments on commit df89f2a

Please sign in to comment.