We use guide.rst as our index, so there is no need for a secondary one.
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This is a fresh import of uvbook [0], as is. It is to be considered
"beta", as the entire content hasn't been revised / adapted yet.
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Mea culpa, I forgot to update the documentation in commit ff0ae10
("unix: preserve loop->data across loop init/done") from July 2016.
PR-URL: https://github.com/libuv/libuv/pull/1299
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
While reading the design page I came across a few sentences that could
perhaps be improved, and this commit contains suggestions for such
improvements.
PR-URL: https://github.com/libuv/libuv/pull/1302
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit fixes a warning about the title underline
being too short.
PR-URL: https://github.com/libuv/libuv/pull/1300
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Use "file system" instead of "filesystem" throughout the document and
some other minor fixes.
PR-URL: https://github.com/libuv/libuv/pull/1278
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_fork
function for each supported platform, similar to the way
uv__platform_loop_init works.
After this call, existing and new IO, async and signal watchers will
contiue working as before on all platforms, as will the
threadpool (although any threads it was using are of course gone).
On Linux and BSDs that use kqueue, existing and new fsevent watchers
will also continue to work as expected. On OS X, though, directory
fsevents will not be able to use the optimized CoreFoundation path if
they had already been used in the parent process, instead falling back
to the kqueue path used on other BSDs.
Existing fsevent watchers will not function on AIX or SunOS. This
could be relatively easily fixed by someone with AIX knowledge in the
future, but SunOS will require some additional work to keep track if
the watchers.
A new test file, test/test-fork.c, was added to contain fork-related
tests to verify functionality in the child process.
PR-URL: https://github.com/libuv/libuv/pull/846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
It behaves as `uv_signal_start` but it resets the signal handler as soon
as the signal is received.
Fixes: https://github.com/libuv/libuv/issues/1104
PR-URL: https://github.com/libuv/libuv/pull/1106
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
This patch enables querying and setting the process title on AIX.
libuv takes ownership of the memory for argv and returns a deep copy
of the array and its contents.
It also enables the process_title test case.
The process title can be changed on AIX but is handled differently
to Linux/Mac. Commands like ps read the original argv array passed
to the process instead of the memory at argv[0]. To change the process
title we need to update argv[0] to point at a new string and set
argv[1] to NULL (if it exists). This means the process title
can be set to a string of any length.
PR-URL: https://github.com/libuv/libuv/pull/1187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Currently the libuv version is reported as unknown on the
website. This is because the UV_VERSION_MINOR is no longer
a single digit and the regex is not getting a match for
the minor number. This commit makes the version regexs
capture multiple digit numbers.
PR-URL: https://github.com/libuv/libuv/pull/1205
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
uv_translate_sys_error() was a private function for Windows.
This commit adds an equivalent function on other platforms, and
exposes it as public API.
Exposing this is useful in scenarios where the application uses
both libuv functions and platform-specific system calls and wants
to report errors uniformly as libuv errors.
Fixes: https://github.com/libuv/libuv/issues/79
PR-URL: https://github.com/libuv/libuv/pull/1060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Previous description implied enabling nodelay enabled Nagle, but it is
the other way around.
PR-URL: https://github.com/libuv/libuv/pull/1050
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This is probably a reminiscent of the usage in libuv 0.x, where alloc_cb
used to return a uv_buf_t.
Refs: https://github.com/libuv/libuv/issues/1027#issuecomment-244386298
PR-URL: https://github.com/libuv/libuv/pull/1033
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
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>
uv_write_t can be reused safely only after the callback passed to
uv_write is fired.
PR-URL: https://github.com/libuv/libuv/pull/927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
`POLLHDRUP` is not implemented on AIX. Therefore `UV_DISCONNECT` will
never be set on `events`. This causes the socket to never be closed and
the tests to be stuck inside `pollset_poll` indefinitely, resulting in a
timeout.
This fixes the following tests:
- poll_duplex
- poll_unidirectional
Updated docs to let end users know that `UV_DISCONNECT` can be set, but
is unsupported on AIX.
Fixes: https://github.com/libuv/libuv/issues/844
PR-URL: https://github.com/libuv/libuv/pull/857
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Find the real name of the tty using ttyname_r(3) instead of
opening "/dev/tty" which causes trouble if the fd doesn't point to the
controlling terminal.
PR-URL: https://github.com/libuv/libuv/pull/779
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Make explicit that handles and requests should be closed before calling
uv_loop_close().
Fixes: https://github.com/libuv/libuv/issues/765
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
If an API function returns UV_ENOBUFS make sure we count the terminating
null, which we need space for. In case of success the null byte is not
included in the count, but the buffer *is* null terminated.
PR-URL: https://github.com/libuv/libuv/pull/690
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Equivalent to realpath(3), returns the full resolved absolute path of a
file or directory.
PR-URL: https://github.com/libuv/libuv/pull/531
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>