aboutsummaryrefslogtreecommitdiff
path: root/docs/src
Commit message (Collapse)AuthorAge
* doc: improve uv_fs_readdir() cleanup docscjihrig2019-10-06
| | | | | | | | | | When cleaning up after uv_fs_readdir(), it is important to call uv_fs_req_cleanup() on the readdir request prior to calling uv_fs_closedir(), because the latter frees memory that the former needs in order to do its job. PR-URL: https://github.com/libuv/libuv/pull/2497 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* docs: fix literal-includes in User GuideNhan Khong2019-09-25
| | | | | | | | | | Using raw copies in place of sphinx literalinclude directives as the API of v1.x is now stable. Fixes: https://github.com/libuv/libuv/issues/2350 PR-URL: https://github.com/libuv/libuv/pull/2353 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
* unix,win: add uv_random()Ben Noordhuis2019-09-18
| | | | | | | | | | | Add an API for obtaining cryptographically strong random data from the system PRNG. Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net> Refs: https://github.com/libuv/libuv/pull/1055 PR-URL: https://github.com/libuv/libuv/pull/2347 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: uv_handle_t documentation suggestionDaniel Bevenius2019-09-09
| | | | | | | | | This commit contains a suggestion to hopefully improve the documentation of uv_handle_t's member uv_loop_t. PR-URL: https://github.com/libuv/libuv/pull/2446 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* win, tty: improve SIGWINCH performanceBartosz Sosnowski2019-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing improvement of SIGWINCH from PR #2308. Running SetWinEventHook without filtering for the specific PIDs has significant impact on the performance of the entire system. This PR changes the way SIGWINCH is handled. The SetWinEventHook callback now signals a separate thread, uv__tty_console_resize_watcher_thread. This thread calls uv__tty_console_signal_resize() which checks if the console was actually resized. The uv__tty_console_resize_watcher_thread makes sure to not to call the uv__tty_console_signal_resize function more than 30 times per second. The SetWinEventHook will not be installed, if the PID of the conhost.exe process that owns the console window cannot be determinated. This can happen when a 32bit libuv app is running on a 64bit Windows. For such cases PR #1408 is partially reverted - when tty reads WINDOW_BUFFER_SIZE_EVENT, it will also trigger a call to uv__tty_console_signal_resize(). This will also help when the app is running under console emulators. Documentation was also updated to reflect that. Refs: https://github.com/microsoft/terminal/issues/1811 Refs: https://github.com/microsoft/terminal/issues/410 Refs: https://github.com/libuv/libuv/pull/2308 PR-URL: https://github.com/libuv/libuv/pull/2381 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* udp: add source-specific multicast supportVladimir Karnushin2019-08-23
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2202 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: clarify uv_buf_t usage in uv_alloc_cbTomas Krizek2019-08-23
| | | | | | | | | | | | | Clarify the uv_buf_t isn't reused and the user is responsible for freeing it in the recv/read callback. Previously, this wasn't clear when reading only the docs for uv_udp_recv_cb and uv_alloc_cb. PR-URL: https://github.com/libuv/libuv/pull/2438 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* tcp: add uv_tcp_close_reset methodSantiago Gimeno2019-08-19
| | | | | | | | | | | | | It resets a TCP connection by sending a RST packet. Due to some platform inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls is not allowed. Fixes: https://github.com/libuv/libuv/issues/1991 PR-URL: https://github.com/libuv/libuv/pull/2425 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* win: remove try-except outside MSVCCrunkle2019-08-09
| | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/2407 PR-URL: https://github.com/libuv/libuv/pull/2412 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
* doc: fix typo in basics.rstNan Xiao2019-08-06
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2366 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* unix,win: add ability to retrieve all env variablesSaúl Ibarra Corretgé2019-08-03
| | | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/2400 PR-URL: https://github.com/libuv/libuv/pull/2404 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* unix,win: add uv_fs_statfs()cjihrig2019-08-01
| | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/2386 PR-URL: https://github.com/libuv/libuv/pull/2396 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
* win: add UV_FS_O_FILEMAPJoão Reis2019-07-16
| | | | | | | | Reading and writing files using a memory file mapping can be significantly faster on Windows. PR-URL: https://github.com/libuv/libuv/pull/2295 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
* doc: fix incorrect versionchangedcjihrig2019-06-27
| | | | | | | | Version 1.29.2 never happened. Update the versionchanged from 9a10058e72fb62c3e6ffd82e1f3f393c717e63f5 to be 1.30.0. PR-URL: https://github.com/libuv/libuv/pull/2354 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* doc: fix wrong mutex function prototypesLeo Chung2019-06-25
| | | | | The `:lines:` numbers were wrong, they showed the signatures of the uv_fs_access and uv_fs_chmod functions.
* doc: add link to nodejs.orgJenil Christo2019-06-24
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2325 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* threadpool: increase UV_THREADPOOL_SIZE limitVlad A2019-06-07
| | | | | | | | | | Increase the UV_THREADPOOL_SIZE limit to 1024 and update the docs. Fixes: https://github.com/libuv/libuv/pull/2296 PR-URL: https://github.com/libuv/libuv/pull/2314 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* unix,win: add uv_get_constrained_memory()Kelvin Jin2019-05-15
| | | | | | | Fixes: https://github.com/libuv/libuv/issues/2286 PR-URL: https://github.com/libuv/libuv/pull/2289 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: fix build with sphinx 2.xFX Coudert2019-05-13
| | | | | | | | | | app.info() was deprecated on Jan 4, 2017 (sphinx-doc/sphinx#3267), and removed as of Sphinx 2.0.0. This commit removes the usage of app.info(). PR-URL: https://github.com/libuv/libuv/pull/2265 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* doc: add missing uv_fs_type entriesMichele Caini2019-05-13
| | | | | PR-URL: https://github.com/libuv/libuv/pull/2280 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: mark uv_async_send() as async-signal-safeBen Noordhuis2019-04-23
| | | | | | | Refs: https://github.com/libuv/libuv/issues/2173 PR-URL: https://github.com/libuv/libuv/pull/2273 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: document uv_timeval_t and uv_timeval64_tcjihrig2019-04-11
| | | | | PR-URL: https://github.com/libuv/libuv/pull/2246 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* unix,win: introduce uv_timeval64_tcjihrig2019-04-11
| | | | | | Fixes: https://github.com/libuv/libuv/issues/2243 PR-URL: https://github.com/libuv/libuv/pull/2246 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* unix,win: add uv_fs_{open,read,close}dir()cjihrig2019-03-26
| | | | | | | | | | | | | | Co-authored-by: Julien Gilli <jgilli@nodejs.org> Co-authored-by: Jeremy Whitlock <jwhitlock@apache.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/libuv/libuv/pull/2057 Refs: https://github.com/joyent/libuv/issues/1430 Refs: https://github.com/joyent/libuv/pull/1521 Refs: https://github.com/joyent/libuv/pull/1574 Refs: https://github.com/libuv/libuv/pull/175 Refs: https://github.com/nodejs/node/issues/583 Refs: https://github.com/libuv/libuv/pull/416 Refs: https://github.com/libuv/libuv/issues/170
* unix,win: add uv_gettimeofday()cjihrig2019-03-25
| | | | | | | | PR-URL: https://github.com/libuv/libuv/pull/2221 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* udp: add support for UDP connected socketsSantiago Gimeno2019-03-16
| | | | | | | | | | | | | | | | | Add two new methods: `uv_udp_connect()` to connect / disconnect an UDP handle. `uv_udp_getpeername()` to get the remote peer address of a connected UDP handle. Modify `uv_udp_send()` and `uv_udp_try_send()` to accept a `NULL` `addr` to send messages over an "UDP connection". Refs: https://github.com/libuv/leps/pull/10 PR-URL: https://github.com/libuv/libuv/pull/1872 Backport-PR-URL: https://github.com/libuv/libuv/pull/2217 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: fix typo in uv_thread_options_t definitionRyan Liptak2019-03-16
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2195 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* doc: add note about uv_run() not being reentrantBen Noordhuis2019-03-08
| | | | | | | PR-URL: https://github.com/libuv/libuv/pull/2208 Refs: https://github.com/libuv/help/issues/81 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* doc: describe unix signal handling betterVladimír Čunát2019-02-11
| | | | | | | | | | | | | | - SIGTERM seems OK to handle - I tested that on Linux, read POSIX, etc. I can't see why it should be different from SIGUSR1, for example, except that the default handler is different. - Also raise(15) is caught by the handler for me, and I can't see why it wouldn't. The main source of knowledge for this is POSIX. http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03 PR-URL: https://github.com/libuv/libuv/pull/1987 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* thread: allow specifying stack size for new threadAnna Henningsen2019-02-08
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/2179 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* src,include: define UV_MAXHOSTNAMESIZEcjihrig2019-02-05
| | | | | | | | | | | | This commit adds UV_MAXHOSTNAMESIZE for working with uv_os_gethostname(). Prior to this commit, this logic was duplicated in several places across libuv and Node.js alone. PR-URL: https://github.com/libuv/libuv/pull/2175 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* doc: fix uv_get_free_memory docStephen Belanger2019-02-05
| | | | | | | | | There was a formatting error that prevented the uv_get_free_memory function from appearing on the page. PR-URL: https://github.com/libuv/libuv/pull/2163 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
* unix,win: add uv_os_uname()cjihrig2019-01-14
| | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/2126 PR-URL: https://github.com/libuv/libuv/pull/2128 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* Revert "win,fs: retry if uv_fs_rename fails"Ben Noordhuis2018-12-27
| | | | | | | | | | | | | This reverts commit e94c184c7c4a18f3de569c97caeb83f4ff98a4b2. Concerns were raised about the suitability of this policy and I, for one, agree with them. Fixes: https://github.com/libuv/libuv/issues/2098 PR-URL: https://github.com/libuv/libuv/pull/2122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: clarify expected memory management strategyIvan Krylov2018-12-02
| | | | | | | | | | | Right now, docs don't make it clear when exactly does it become okay to free memory belonging to `uv_handle_t`. It's only stated that `uv_close` must be called before freeing the memory, which is a source of confusion for new users: they call `uv_close(handle, NULL)`, then free the memory (see e.g. #2078, https://stackoverflow.com/q/25615340). PR-URL: https://github.com/libuv/libuv/pull/2087 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* win: support more fine-grained windows hidingBartosz Sosnowski2018-11-10
| | | | | | | | | | | | Added UV_PROCESS_WINDOWS_HIDE_CONSOLE and UV_PROCESS_WINDOWS_HIDE_GUI for specifying if console or GUI subprocess windows are to be hidden. Refs: https://github.com/nodejs/node/pull/24034 PR-URL: https://github.com/libuv/libuv/pull/2073 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* win,fs: retry if uv_fs_rename failsBartosz Sosnowski2018-11-01
| | | | | | | | | | | On Windows rename operation can fail randomly in presence of antivirus or indexing software. Make `uv_fs_rename` retry up to four times with 250ms delay between attempts before giving up. PR-URL: https://github.com/libuv/libuv/pull/1981 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* win,doc: path encoding in uv_fs_XX is UTF-8hitesh2018-10-11
| | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/1554 PR-URL: https://github.com/libuv/libuv/pull/1943 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* doc: remove extraneous "on"Ben Noordhuis2018-10-02
| | | | | | | | | Fixes: https://github.com/libuv/libuv/issues/2000 PR-URL: https://github.com/libuv/libuv/pull/2010 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jamie Davis <davisjam@vt.edu> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* stream: autodetect directionJameson Nash2018-09-19
| | | | | | | | | | | | | Previously, we required the user to specify the expected read/write flags for a pipe or tty. But we've already been asking the OS to tell us what they actually are (fcntl F_GETFL), so we can hopefully just use that information directly. Fixes: https://github.com/libuv/libuv/issues/1936 PR-URL: https://github.com/libuv/libuv/pull/1964 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* win,doc: improve uv_os_setpriority() documentationBartosz Sosnowski2018-09-18
| | | | | | | Refs: https://github.com/nodejs/node/pull/22817 PR-URL: https://github.com/libuv/libuv/pull/1985 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: clarify that some remarks apply to windowsBert Belder2018-09-18
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/1988 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* doc: fix argument name in tcp.rtsEmil Bay2018-09-03
| | | | | | PR-URL: https://github.com/libuv/libuv/pull/1974 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* doc: add missing slash in stream.rstEmil Bay2018-09-01
| | | | | | | PR-URL: https://github.com/libuv/libuv/pull/1973 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
* unix,win: add uv_os_{get,set}priority()cjihrig2018-08-15
| | | | | | | Refs: https://github.com/nodejs/node/pull/21675 PR-URL: https://github.com/libuv/libuv/pull/1945 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* fs: add uv_open_osfhandleBartosz Sosnowski2018-08-09
| | | | | | | | | | Adds uv_open_osfhandle to complete uv_get_osfhandle Ref: https://github.com/nodejs/node/issues/15433 Ref: https://github.com/nodejs/node-addon-api/issues/304 PR-URL: https://github.com/libuv/libuv/pull/1927 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* fs: change position of uv_fs_lchownUjjwal Sharma2018-07-07
| | | | | | | | | | | | | | | | Change the position of UV_LS_LCHOWN, moving it to the end in order to go around a bug due to it's initial position. The original position of UV_LS_LCHOWN broke ABI compat, causing a binary using UV_FS_REALPATH or UV_FS_COPYFILE to break, as the values point to wrong function. Refs: https://github.com/yarnpkg/yarn/issues/6043 Fixes: https://github.com/libuv/libuv/issues/1908 PR-URL: https://github.com/libuv/libuv/pull/1913 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
* src: add new error apis to prevent memory leaksShelley Vohr2018-07-06
| | | | | | | | | | | | | | | | This PR creates two new externally-facing APIs, uv_err_name_r() and uv_strerror_r(). In keeping with the precedent set by POSIX, the *_r() suffix of these two new methods indicate that the caller does the memory management and passes in the memory that the output will be stored in, which provides an alternative for the two existent methods (uv_err_name() and uv_strerror()), which, when called with an unknown error code, leak a few bytes of memory. PR-URL: https://github.com/libuv/libuv/pull/1898 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com
* doc: document UV_*_MAP() macrosEd Schouten2018-06-19
| | | | | | | | | UV_ERRNO_MAP(), UV_HANDLE_TYPE_MAP(), and UV_REQ_TYPE_MAP() are considered part of the public API. This commit documents them. Fixes: https://github.com/libuv/libuv/issues/1607 PR-URL: https://github.com/libuv/libuv/pull/1653 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* doc: undocument uv_req_type's UV_REQ_TYPE_PRIVATEEd Schouten2018-06-19
| | | | | | | | | | This is merely an internal definition that may expand to OS specific request types. It is not an actual symbolic constant part of the enumeration. Fixes: https://github.com/libuv/libuv/issues/1607 PR-URL: https://github.com/libuv/libuv/pull/1653 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>