diff options
author | Pleuvens <pleuvens.fervil@gmail.com> | 2023-10-14 13:07:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-14 13:07:05 +0200 |
commit | dc1bb0088e8fbb92c81beb55341dcb7b4079717f (patch) | |
tree | b36fe7d3e1d5e5aa1a2da53f43114e55ad59683c /docs/src | |
parent | 197f453b76e2eada48c640a91318cdc7fe820f56 (diff) | |
download | libuv-dc1bb0088e8fbb92c81beb55341dcb7b4079717f.tar.gz libuv-dc1bb0088e8fbb92c81beb55341dcb7b4079717f.zip |
doc: uv_close should be called after exit callback (#4164)
Fixes: https://github.com/libuv/libuv/issues/1911
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/guide/processes.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/src/guide/processes.rst b/docs/src/guide/processes.rst index c1278f17..99d65c40 100644 --- a/docs/src/guide/processes.rst +++ b/docs/src/guide/processes.rst @@ -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 ------- |