doc: uv_close should be called after exit callback (#4164)
Fixes: https://github.com/libuv/libuv/issues/1911
This commit is contained in:
parent
197f453b76
commit
dc1bb0088e
@ -53,6 +53,8 @@ ID of the child process.
|
|||||||
The exit callback will be invoked with the *exit status* and the type of *signal*
|
The exit callback will be invoked with the *exit status* and the type of *signal*
|
||||||
which caused the exit.
|
which caused the exit.
|
||||||
|
|
||||||
|
Note that it is important **not** to call ``uv_close`` before the exit callback.
|
||||||
|
|
||||||
.. rubric:: spawn/main.c
|
.. rubric:: spawn/main.c
|
||||||
.. literalinclude:: ../../code/spawn/main.c
|
.. literalinclude:: ../../code/spawn/main.c
|
||||||
:language: c
|
:language: c
|
||||||
@ -126,7 +128,8 @@ of ``uv_kill`` is::
|
|||||||
|
|
||||||
For processes started using libuv, you may use ``uv_process_kill`` instead,
|
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
|
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
|
Signals
|
||||||
-------
|
-------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user