1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

doc: uv_close should be called after exit callback (#4164)

Fixes: https://github.com/libuv/libuv/issues/1911
This commit is contained in:
Pleuvens 2023-10-14 13:07:05 +02:00 committed by GitHub
parent 197f453b76
commit dc1bb0088e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,8 @@ ID of the child process.
The exit callback will be invoked with the *exit status* and the type of *signal*
which caused the exit.
Note that it is important **not** to call ``uv_close`` before the exit callback.
.. rubric:: spawn/main.c
.. literalinclude:: ../../code/spawn/main.c
:language: c
@ -126,7 +128,8 @@ of ``uv_kill`` is::
For processes started using libuv, you may use ``uv_process_kill`` instead,
which accepts the ``uv_process_t`` watcher as the first argument, rather than
the pid. In this case, **remember to call** ``uv_close`` on the watcher.
the pid. In this case, **remember to call** ``uv_close`` on the watcher _after_
the exit callback has been called.
Signals
-------