document Nim's signal handling briefly; closes #8224

This commit is contained in:
Araq 2018-09-03 12:02:56 +02:00
commit d1e3a7c827

View file

@ -326,9 +326,9 @@ The standard library supports a growing number of ``useX`` conditional defines
affecting how some features are implemented. This section tries to give a
complete list.
================== =========================================================
====================== =========================================================
Define Effect
================== =========================================================
====================== =========================================================
``release`` Turns off runtime checks and turns on the optimizer.
``useWinAnsi`` Modules like ``os`` and ``osproc`` use the Ansi versions
of the Windows API. The default build uses the Unicode
@ -358,8 +358,9 @@ Define Effect
``useShPath`` This symbol takes a string as its value, like
``--define:useShPath:/opt/sh/bin/sh`` to override the
path for the ``sh`` binary, in cases where it is not
located in the default location ``/bin/sh``
================== =========================================================
located in the default location ``/bin/sh``.
``noSignalHandler`` Disable the crash handler from ``system.nim``.
====================== =========================================================
@ -529,6 +530,16 @@ See the documentation of Nim's soft realtime `GC <gc.html>`_ for further
information.
Signal handling in Nim
======================
The Nim programming language has no concept of Posix's signal handling
mechanisms. However, the standard library offers some rudimentary support
for signal handling, in particular, segmentation faults are turned into
fatal errors that produce a stack trace. This can be disabled with the
``-d:noSignalHandler`` switch.
Debugging with Nim
==================