From fb4c5631325e49363ebe72076a0d422fd9e5e627 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 8 Feb 2020 12:28:34 +0100 Subject: [PATCH] docs: uv_setup_args() may take ownership of argv PR-URL: https://github.com/libuv/libuv/pull/2668 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Santiago Gimeno --- docs/src/misc.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/src/misc.rst b/docs/src/misc.rst index 7cfac85f..d9bf3aef 100644 --- a/docs/src/misc.rst +++ b/docs/src/misc.rst @@ -244,6 +244,15 @@ API .. c:function:: char** uv_setup_args(int argc, char** argv) Store the program arguments. Required for getting / setting the process title. + Libuv may take ownership of the memory that `argv` points to. This function + should be called exactly once, at program start-up. + + Example: + + :: + + argv = uv_setup_args(argc, argv); /* May return a copy of argv. */ + .. c:function:: int uv_get_process_title(char* buffer, size_t size)