document Nim's signal handling briefly; closes #8224
This commit is contained in:
parent
4b823b2825
commit
d1e3a7c827
1 changed files with 45 additions and 34 deletions
79
doc/nimc.rst
79
doc/nimc.rst
|
|
@ -326,40 +326,41 @@ The standard library supports a growing number of ``useX`` conditional defines
|
||||||
affecting how some features are implemented. This section tries to give a
|
affecting how some features are implemented. This section tries to give a
|
||||||
complete list.
|
complete list.
|
||||||
|
|
||||||
================== =========================================================
|
====================== =========================================================
|
||||||
Define Effect
|
Define Effect
|
||||||
================== =========================================================
|
====================== =========================================================
|
||||||
``release`` Turns off runtime checks and turns on the optimizer.
|
``release`` Turns off runtime checks and turns on the optimizer.
|
||||||
``useWinAnsi`` Modules like ``os`` and ``osproc`` use the Ansi versions
|
``useWinAnsi`` Modules like ``os`` and ``osproc`` use the Ansi versions
|
||||||
of the Windows API. The default build uses the Unicode
|
of the Windows API. The default build uses the Unicode
|
||||||
version.
|
version.
|
||||||
``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``.
|
``useFork`` Makes ``osproc`` use ``fork`` instead of ``posix_spawn``.
|
||||||
``useNimRtl`` Compile and link against ``nimrtl.dll``.
|
``useNimRtl`` Compile and link against ``nimrtl.dll``.
|
||||||
``useMalloc`` Makes Nim use C's `malloc`:idx: instead of Nim's
|
``useMalloc`` Makes Nim use C's `malloc`:idx: instead of Nim's
|
||||||
own memory manager, ableit prefixing each allocation with
|
own memory manager, ableit prefixing each allocation with
|
||||||
its size to support clearing memory on reallocation.
|
its size to support clearing memory on reallocation.
|
||||||
This only works with ``gc:none``.
|
This only works with ``gc:none``.
|
||||||
``useRealtimeGC`` Enables support of Nim's GC for *soft* realtime
|
``useRealtimeGC`` Enables support of Nim's GC for *soft* realtime
|
||||||
systems. See the documentation of the `gc <gc.html>`_
|
systems. See the documentation of the `gc <gc.html>`_
|
||||||
for further information.
|
for further information.
|
||||||
``nodejs`` The JS target is actually ``node.js``.
|
``nodejs`` The JS target is actually ``node.js``.
|
||||||
``ssl`` Enables OpenSSL support for the sockets module.
|
``ssl`` Enables OpenSSL support for the sockets module.
|
||||||
``memProfiler`` Enables memory profiling for the native GC.
|
``memProfiler`` Enables memory profiling for the native GC.
|
||||||
``uClibc`` Use uClibc instead of libc. (Relevant for Unix-like OSes)
|
``uClibc`` Use uClibc instead of libc. (Relevant for Unix-like OSes)
|
||||||
``checkAbi`` When using types from C headers, add checks that compare
|
``checkAbi`` When using types from C headers, add checks that compare
|
||||||
what's in the Nim file with what's in the C header
|
what's in the Nim file with what's in the C header
|
||||||
(requires a C compiler with _Static_assert support, like
|
(requires a C compiler with _Static_assert support, like
|
||||||
any C11 compiler)
|
any C11 compiler)
|
||||||
``tempDir`` This symbol takes a string as its value, like
|
``tempDir`` This symbol takes a string as its value, like
|
||||||
``--define:tempDir:/some/temp/path`` to override the
|
``--define:tempDir:/some/temp/path`` to override the
|
||||||
temporary directory returned by ``os.getTempDir()``.
|
temporary directory returned by ``os.getTempDir()``.
|
||||||
The value **should** end with a directory separator
|
The value **should** end with a directory separator
|
||||||
character. (Relevant for the Android platform)
|
character. (Relevant for the Android platform)
|
||||||
``useShPath`` This symbol takes a string as its value, like
|
``useShPath`` This symbol takes a string as its value, like
|
||||||
``--define:useShPath:/opt/sh/bin/sh`` to override the
|
``--define:useShPath:/opt/sh/bin/sh`` to override the
|
||||||
path for the ``sh`` binary, in cases where it is not
|
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.
|
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
|
Debugging with Nim
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue