diff options
author | Ryan Liptak <squeek502@hotmail.com> | 2020-05-15 23:07:01 -0700 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2020-08-09 11:52:22 -0400 |
commit | 07e4168b67f6d06dac2c2e21c9a1976a0db9d312 (patch) | |
tree | 301ba075eefb79f80045839eeaafc0c2832a3a57 /docs/src/sphinx-plugins/manpage.py | |
parent | 278cfa018356c29b24b8be6a25dbefba84b406d3 (diff) | |
download | libuv-07e4168b67f6d06dac2c2e21c9a1976a0db9d312.tar.gz libuv-07e4168b67f6d06dac2c2e21c9a1976a0db9d312.zip |
unix: error when uv_setup_args() is not called
This commit updates uv_{get,set}_process_title() to return an
error when uv_setup_args() is needed, but has not been called.
Per-platform behavior after this commit:
- Windows: uv_setup_args() does nothing, get/set process title
works as before.
- Unix: get/set process title will return ENOBUFS if
uv_setup_args() wasn't called, if it failed, or if the process
title memory has been freed by uv__process_title_cleanup()
(via uv_library_shutdown()).
- AIX: set process title returns ENOBUFS if uv_setup_args()
wasn't called, if it failed to allocate memory for the argv
copy, or if the proctitle memory has been freed by
uv__process_title_cleanup() (via uv_library_shutdown).
Getting the process title will do the same except it can
still succeed if uv_setup_args() was called but failed to
allocate memory for the argv copy.
- BSD: uv_setup_args() is only needed for getting the initial
process title; if uv_setup_args() is not called then any
get_process_title calls() before a set_process_title() call
will return an empty string.
- Platforms that use no-proctitle.c: get will return an empty
string, set is a no-op (these are the same as before this commit)
Fixes: https://github.com/libuv/libuv/issues/2845
PR-URL: https://github.com/libuv/libuv/pull/2853
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Diffstat (limited to 'docs/src/sphinx-plugins/manpage.py')
0 files changed, 0 insertions, 0 deletions