Prechádzať zdrojové kódy

Merge topic 'doc-exit-code-range'

c980745b82 Help: Specify advisable range for exit code in cmake_language(EXIT)

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9352
Brad King 1 rok pred
rodič
commit
6b035118de
1 zmenil súbory, kde vykonal 7 pridanie a 2 odobranie
  1. 7 2
      Help/command/cmake_language.rst

+ 7 - 2
Help/command/cmake_language.rst

@@ -519,8 +519,13 @@ Terminating Scripts
   Terminate the current :option:`cmake -P` script and exit with ``<exit-code>``.
 
   This command works only in :ref:`script mode <Script Processing Mode>`.
+  If used outside of that context, it will cause a fatal error.
 
   The ``<exit-code>`` should be non-negative.
-  If ``<exit-code>`` is negative then the behavior
+  If ``<exit-code>`` is negative, then the behavior
   is unspecified (e.g., on Windows the error code -1
-  becomes ``0xffffffff``, and on Linux it becomes ``255``).
+  becomes ``0xffffffff``, and on Linux it becomes 255).
+  Exit codes above 255 may not be supported by the underlying
+  shell or platform, and some shells may interpret values
+  above 125 specially.  Therefore, it is advisable to only
+  specify an ``<exit-code>`` in the range 0 to 125.