doc: clarify handle close behavior of uv_spawn (#5055)
Contrary to how most handle init functions work, callers of uv_spawn must always call uv_close, even if it returned an error.
This commit is contained in:
parent
6cdf71da80
commit
d357575b2b
@ -259,7 +259,8 @@ API
|
|||||||
Initializes the process handle and starts the process. If the process is
|
Initializes the process handle and starts the process. If the process is
|
||||||
successfully spawned, this function will return 0. Otherwise, the
|
successfully spawned, this function will return 0. Otherwise, the
|
||||||
negative error code corresponding to the reason it couldn't spawn is
|
negative error code corresponding to the reason it couldn't spawn is
|
||||||
returned.
|
returned. Note that either way you must eventually call :c:func:`uv_close`
|
||||||
|
to close the handle again.
|
||||||
|
|
||||||
Possible reasons for failing to spawn would include (but not be limited to)
|
Possible reasons for failing to spawn would include (but not be limited to)
|
||||||
the file to execute not existing, not having permissions to use the setuid or
|
the file to execute not existing, not having permissions to use the setuid or
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user