aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-06-27 16:09:46 -0400
committercjihrig <cjihrig@gmail.com>2016-07-14 09:47:23 -0400
commit840a8c599ec1f138992a538f5b8109f91f31805e (patch)
tree33f3636526565a189b667c7e64d384680ccbeaa2 /docs/src
parent70002c80bf1447fad605b61d9d6e83e9d0c1a6bc (diff)
downloadlibuv-840a8c599ec1f138992a538f5b8109f91f31805e.tar.gz
libuv-840a8c599ec1f138992a538f5b8109f91f31805e.zip
unix,win: make uv_get_process_title() stricter
This commit causes uv_get_process_title() to: - return EINVAL if the buffer is null or size is 0 - return ENOBUFS if the title is too big for the buffer - null terminate the buffer on success Fixes: https://github.com/libuv/libuv/issues/315 PR-URL: https://github.com/libuv/libuv/pull/928 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/misc.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/src/misc.rst b/docs/src/misc.rst
index f32af48f..3b7f31aa 100644
--- a/docs/src/misc.rst
+++ b/docs/src/misc.rst
@@ -183,7 +183,9 @@ API
.. c:function:: int uv_get_process_title(char* buffer, size_t size)
- Gets the title of the current process.
+ Gets the title of the current process. If `buffer` is `NULL` or `size` is
+ zero, `UV_EINVAL` is returned. If `size` cannot accommodate the process
+ title and terminating `NULL` character, the function returns `UV_ENOBUFS`.
.. c:function:: int uv_set_process_title(const char* title)