Commit Graph

120 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
0227060489 doc: add warning note to user guide
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:15:53 +02:00
Saúl Ibarra Corretgé
481f454403 doc: remove licensing note from guide/about
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:15:47 +02:00
Saúl Ibarra Corretgé
1caae80cd6 doc: update guide/about and mention new maintainership
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:15:38 +02:00
Saúl Ibarra Corretgé
a94f83e4d8 doc: removed unused file
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>
2017-04-28 11:15:29 +02:00
Saúl Ibarra Corretgé
b80106de45 doc: add initial version of the User Guide
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>
2017-04-28 11:15:10 +02:00
Saúl Ibarra Corretgé
521146dac4 doc: move "upgrading" to a standalone document
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:15:04 +02:00
Saúl Ibarra Corretgé
afb37ce451 doc: move documentation section up
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:14:56 +02:00
Saúl Ibarra Corretgé
8e95cba175 doc: move TOC to a dedicated document
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:14:50 +02:00
Saúl Ibarra Corretgé
d2eca716f1 doc: update copyright years
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:14:39 +02:00
Saúl Ibarra Corretgé
93415e662b doc: rename docs to "libuv documentation"
PR-URL: https://github.com/libuv/libuv/pull/1246
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-28 11:13:39 +02:00
Daniel Kahn Gillmor
e4bc694b36 doc: fix documentation for uv_handle_t.type
PR-URL: https://github.com/libuv/libuv/pull/1316
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-25 08:15:11 +02:00
Ben Noordhuis
a76e7830ca doc: libuv does not touch uv_loop_t.data
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>
2017-04-18 10:42:23 +02:00
Daniel Bevenius
12f18159cf
doc: suggestions for design page
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>
2017-04-12 12:12:52 +02:00
Daniel Bevenius
a3d9d8ed73 doc: minor grammar fix in Installation section
PR-URL: https://github.com/libuv/libuv/pull/1301
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-11 10:45:40 -04:00
Daniel Bevenius
5e5ac86a54 doc: fix docs/src/fs.rst build warning
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>
2017-04-11 10:43:23 -04:00
Jamie Davis
eb8509210d doc: fix multiple doc typos
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>
2017-04-01 19:25:17 +02:00
Jason Madden
fd7ce57f2b unix: make loops and watchers usable after fork()
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>
2017-03-21 12:23:44 +01:00
cjihrig
c4bd9f48e0 docs: improve UV_ENOBUFS scenario documentation
This commit adds additional documentation to the UV_ENOBUFS
scenario for several methods.

Fixes: https://github.com/libuv/libuv/issues/1179
PR-URL: https://github.com/libuv/libuv/pull/1235
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-08 20:55:40 -05:00
cjihrig
ee02f60c90 unix,win: add uv_os_{get,set,unset}env()
These functions are used to create, retrieve, update, and delete
environment variables.

Fixes: https://github.com/libuv/libuv/issues/1198
PR-URL: https://github.com/libuv/libuv/pull/1234
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-08 20:39:33 -05:00
Santiago Gimeno
45616f542d
signal: add uv_signal_start_oneshot method
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>
2017-02-28 14:16:54 +01:00
Howard Hellyer
d6427e4beb
aix: enable uv_get/set_process_title
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>
2017-01-26 12:50:49 +01:00
Daniel Bevenius
c722b8d278 doc: add repitition qualifier to version regexs
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>
2017-01-20 09:52:39 -05:00
Michele Caini
5f34766a14 doc: fix wrong man page link for uv_fs_lstat()
PR-URL: https://github.com/libuv/libuv/pull/1134
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-11-11 15:43:14 -05:00
Philippe Laferriere
f1863dae6b unix,win: add uv_translate_sys_error() public API
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>
2016-10-16 17:47:42 -04:00
Alex Hultman
8ebecf6eab doc: add reference to uv_update_time on uv_timer_start
PR-URL: https://github.com/libuv/libuv/pull/1079
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 07:26:17 +02:00
Vladimír Čunát
1bcdca290d doc: note buffer lifetime requirements in uv_write
Fixes: https://github.com/libuv/libuv/issues/1072
PR-URL: https://github.com/libuv/libuv/pull/1074
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-09 13:00:09 -04:00
Vit Gottwald
20c9c0105b doc: add description of uv_handle_type
Fixes: https://github.com/libuv/libuv/issues/1044
PR-URL: https://github.com/libuv/libuv/pull/1059
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-22 01:50:09 +02:00
Bart Robinson
d38edefc73 doc: fix confusing doc of uv_tcp_nodelay
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>
2016-09-15 10:38:34 +02:00
Imran Iqbal
30d852f9e0
doc: update supported fields for uv_rusage_t
Fixes: https://github.com/libuv/libuv/issues/342
PR-URL: https://github.com/libuv/libuv/pull/1041
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-09-11 17:04:39 -04:00
Saúl Ibarra Corretgé
bf0301c33c doc: improve documentation on uv_alloc_cb
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>
2016-09-07 22:09:17 +02:00
Saúl Ibarra Corretgé
f046ebb409 doc: uv_buf_t members are not readonly
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>
2016-09-07 22:07:11 +02:00
Saúl Ibarra Corretgé
6938f6b0bd doc: document uv_fs_realpath caveats
Fixes: https://github.com/libuv/libuv/issues/1017
PR-URL: https://github.com/libuv/libuv/pull/1026
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-09-02 09:57:25 +02:00
Michele Caini
f001a67e1d doc: add missing entry in uv_fs_type enum
PR-URL: https://github.com/libuv/libuv/pull/958
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-07-28 12:47:56 +01:00
cjihrig
840a8c599e 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>
2016-07-14 09:47:23 -04:00
neevek
1d27bbbb8d doc: add a note on safe reuse of uv_write_t
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>
2016-06-28 10:15:13 -04:00
Saúl Ibarra Corretgé
cdccd4f990 doc: clarify callbacks won't be called in error case
PR-URL: https://github.com/libuv/libuv/pull/918
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-22 01:23:12 +02:00
Pierre-Marie de Rodat
23043a7e95 doc: fix stream typos
PR-URL: https://github.com/libuv/libuv/pull/910
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-13 09:38:09 -04:00
Imran Iqbal
71bd07e588 doc: update docs with AIX related information
Fixes: https://github.com/libuv/libuv/issues/882
PR-URL: https://github.com/libuv/libuv/pull/896
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-02 10:21:15 -04:00
Jason Ginchereau
399e2c8140 win: support sub-second precision in uv_fs_futimes()
Fixes: https://github.com/libuv/libuv/issues/800
PR-URL: https://github.com/libuv/libuv/pull/849
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2016-05-29 11:58:46 +02:00
Saúl Ibarra Corretgé
bd0e8e82de doc: fix generation the first time livehtml runs
PR-URL: https://github.com/libuv/libuv/pull/886
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-26 09:48:28 +02:00
Imran Iqbal
337e9fd0f5 test: fix POLLHDRUP related failures for AIX
`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>
2016-05-05 23:23:28 +02:00
Saúl Ibarra Corretgé
341097403d doc: add ability to live reload and regenerate HTML
PR-URL: https://github.com/libuv/libuv/pull/819
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-11 12:52:59 -03:00
Enno Boland
387102b247 unix: open ttyname instead of /dev/tty
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>
2016-04-01 11:13:22 +02:00
cjihrig
217f81b6a1 unix,win: add uv_get_passwd()
This commit adds the uv_get_passwd() function, which returns a
subset of the current effective user's password file entry.

Refs: https://github.com/libuv/libuv/issues/11
Fixes: https://github.com/libuv/libuv/issues/731
PR-URL: https://github.com/libuv/libuv/pull/742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-29 08:13:59 -04:00
Ben Noordhuis
df96163702 doc: clarify uv_loop_close()
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>
2016-03-20 10:15:20 +01:00
Santiago Gimeno
c7c8e916b8 poll: add UV_DISCONNECT event
It allows detecting the remote socket closing the connection. It's
emitted when `EPOLLRDHUP`(Linux), `EV_EOF`(BSD), `POLLRDHUP`(Solaris,
AIX) and `AFD_POLL_DISCONNECT`(Windows) events are received.

PR-URL: https://github.com/libuv/libuv/pull/691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-15 23:39:49 +01:00
Saúl Ibarra Corretgé
2606ba22a7 unix, win: count null byte on UV_ENOBUFS
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>
2016-03-03 09:23:10 +01:00
Nándor István Krácser
729d68596c doc: add missing write callback to example
PR-URL: https://github.com/libuv/libuv/pull/734
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-02-25 08:56:54 +01:00
cjihrig
c0fa2e7518 unix,win: add uv_os_tmpdir()
PR-URL: https://github.com/libuv/libuv/pull/672
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-01-21 09:11:56 +01:00
Yuval Brik
e76b8838e5 fs: add uv_fs_realpath()
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>
2015-12-05 11:32:58 +01:00