Commit Graph

3735 Commits

Author SHA1 Message Date
Brad King
f4f1f57e7c test: factor out fsevents skip explanation
Factor out a dedicated test macro for use on platforms that
do not support fsevents instead of duplicating the os390
platform condition and explanation text.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:08 +02:00
Brad King
470b0258b0 unix: factor out reusable no-proctitle impl
On SunOS we implement no support for proctitle.  Other platforms may not
support proctitle either, so provide a dedicated source file to use in
this case.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:11:33 +02:00
Ben Noordhuis
6c2fe3d946 test: fix -Wstrict-prototypes compiler warnings
PR-URL: https://github.com/libuv/libuv/pull/1354
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:07:34 +02:00
John Barboza
ff360e7f14
zos: do not inline OOB data by default
It was previously assumed that OOB data had to be
inlined but that is incorrect.

PR-URL: https://github.com/libuv/libuv/pull/1347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-19 12:14:08 +02:00
John Barboza
573e7fe8fc
zos: increase timeout for tcp_writealot
A small timeout resulted in flaky behaviour on the z/OS test
machine.

PR-URL: https://github.com/libuv/libuv/pull/1353
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-19 12:05:29 +02:00
cjihrig
d8cd08bd98 unix,win: add uv_os_gethostname()
Fixes: https://github.com/libuv/libuv/issues/1315
PR-URL: https://github.com/libuv/libuv/pull/1342
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-18 10:27:47 -04:00
Santiago Gimeno
4d0054145d
test: fix flaky tcp-write-queue-order
Delay the timer start to be sure all handles are created when `timer_cb`
is executed. In some cases this was not the case causing the following
error:

```
not ok 51 - tcp_write_queue_order
  exit code 134
  Output from process `tcp_write_queue_order`:
  lt-run-tests: src/unix/core.c:166: uv_close: Assertion `0' failed.
```

PR-URL: https://github.com/libuv/libuv/pull/1338
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
2017-05-17 18:56:59 +02:00
James McCoy
22fc92856d
build,openbsd: remove kvm-related code
Remove the kvm.h include since 38323c9fb replaced the use of kvm_open()
with sysctl(),

Conditionally check for kvm_open() on non-OpenBSD platforms so LIBS (and
libuv.pc) does not unnecessarily contain "-lkvm".

Fixes: https://github.com/libuv/libuv/issues/1340
PR-URL: https://github.com/libuv/libuv/pull/1344
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-17 17:50:58 +02:00
cjihrig
1217832e6f unix: remove FSEventStreamFlushSync() call
This call, in the context of file watching, appears to trigger
assertion warnings on some macOS configurations.

Refs: https://github.com/nodejs/node/issues/854
Fixes: https://github.com/libuv/libuv/issues/1334
PR-URL: https://github.com/libuv/libuv/pull/1349
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-05-16 13:03:55 -04:00
Marc Schlaich
e11dcd4377 unix: do not close udp sockets on bind error
This makes Unix behave in the same way as Windows.

Fixes: https://github.com/libuv/libuv/issues/1336
PR-URL: https://github.com/libuv/libuv/pull/1337
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-09 15:51:26 -04:00
John Barboza
cb0cc7346d
zos: implement uv__io_fork, skip fs event tests
Basic implementation of uv__io_fork on z/OS.
As of now, since filesystem events are not supported,
skip all of those tests on z/OS.

PR-URL: https://github.com/libuv/libuv/pull/1303
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-03 11:58:16 +02:00
Jameson Nash
fd39cec4b8
build: add -Wstrict-prototypes
Fixes: https://github.com/libuv/libuv/pull/1320
PR-URL: https://github.com/libuv/libuv/pull/1326
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-02 23:00:33 +02:00
Rasmus Christian Pedersen
51f3f56f34 test: fix VC++ compilation warning
This commit fixes the following warning:
warning C4047: char *' differs in levels of indirection from 'char
(*)[1]'

PR-URL: https://github.com/libuv/libuv/pull/1290
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-01 14:44:28 -04:00
Keane
196eb8b94f win: remove __declspec(inline) from atomic op
__declspec(inline) is completely undocumented, as well
as unnecessary.  The INLINE preprocessor macro is used
throughout libuv, so this simply replaces the only instance
of declspec(inline) with the macro version.

PR-URL: https://github.com/libuv/libuv/pull/1307
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-01 14:10:13 -04:00
Bartosz Sosnowski
bcf6202921 win,test: support stdout output larger than 1kb
Fix a bug in process_copy_output that would cause output larger
than 1kb to be incorrectly split into lines.

PR-URL: https://github.com/libuv/libuv/pull/1325
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-01 12:52:23 -04:00
Jameson Nash
7350644939 win: avoid leaking pipe handles to child processes
Refs: https://github.com/joyent/libuv/issues/1313
PR-URL: https://github.com/libuv/libuv/pull/1321
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-01 12:27:13 -04:00
Ben Noordhuis
4e61013880 doc: update supported linux/glibc baseline
Now that RHEL/CentOS 5 is end-of-life, update the baseline from
linux >= 2.6.18 + glibc >= 2.5 to linux >= 2.6.32 + glibc >= 2.12.

PR-URL: https://github.com/libuv/libuv/pull/1324
Refs: https://github.com/nodejs/node/pull/12672
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-28 11:21:04 +02:00
Saúl Ibarra Corretgé
d59d6e6f22 doc: add code samples from uvbook (unadapted)
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:16:15 +02:00
Saúl Ibarra Corretgé
2ce5734d76 doc: remove ubvook reference from README
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:16:09 +02:00
Saúl Ibarra Corretgé
ed76c055cd doc: change license to CC BY 4.0
Text taken from:
https://creativecommons.org/licenses/by/4.0/legalcode.txt

Fixes: https://github.com/libuv/libuv/issues/1254
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:59 +02:00
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
Ben Noordhuis
710989b087 zos: use proper prototype for epoll_init()
`int epoll_init()` declares a function that takes any number of
arguments, use `int epoll_init(void)` instead.

PR-URL: https://github.com/libuv/libuv/pull/1314
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: John Barboza <jbarboza@ca.ibm.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-25 17:15:26 +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
Trevor Norris
d898a1f6f8 test: add test for uv_udp_send() fix
Test that the fast path will continue writing. On failure, this test
will timeout.

PR-URL: https://github.com/libuv/libuv/pull/1308
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-20 18:10:43 -04:00
Fedor Indutny
0cbad54f18 udp: fix fast path in uv_udp_send() on unix
"Fast" path in `uv_udp_send()` attempts to write the data straight away
without queueing the fd with epoll/kqueue/... However, in some cases
this is not possible when `sendmsg()` returns `EAGAIN`. In such event
libuv has to queue the fd anyway.

PR-URL: https://github.com/libuv/libuv/pull/1308
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-20 18:10:43 -04:00
Ben Noordhuis
8fd1e40606 doc: add link to libuv/help to README
PR-URL: https://github.com/libuv/libuv/pull/1309
Refs: https://github.com/libuv/libuv/issues/1305
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-18 17:30:04 +02:00
Ben Noordhuis
b678fb6191 github: add ISSUE_TEMPLATE.md
Add a ISSUE_TEMPLATE that redirects people to libuv/help for questions.

PR-URL: https://github.com/libuv/libuv/pull/1309
Refs: https://github.com/libuv/libuv/issues/1305
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-18 17:29:59 +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
Andreas Hauptmann
cd937833a7 win: fix memory leak inside uv_fs_access()
PR-URL: https://github.com/libuv/libuv/pull/1263
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-04-05 10:11:20 -04:00
Rasmus Christian Pedersen
cd676e2dbc unix,test: deadstore fixes
Fixes deadstore in uv_pipe_bind as 'sockfd' is no longer used.
Fixes deadstore in test related to unused variables or missing
assert.

PR-URL: https://github.com/libuv/libuv/pull/1288
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-04-05 09:57:20 -04:00
cjihrig
36d6b1f445 unix: inline uv_pipe_bind() err_bind goto target
This goto target is only one line, and is only reached from
one place.

PR-URL: https://github.com/libuv/libuv/pull/1289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-04-05 09:52:13 -04:00
Santiago Gimeno
cd37fd0fd2
test,osx: fix flaky kill test
At least starting with Darwin Kernel Version 16.4.0, sending a SIGTERM
to a process that is still starting up kills it with SIGKILL instead of
SIGTERM.

Fixes: https://github.com/libuv/libuv/issues/1226
PR-URL: https://github.com/libuv/libuv/pull/1282
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
2017-04-04 12:30:12 +02: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
Bartosz Sosnowski
671ad7839d
fsevent: support for files without short name
A call to GetShortPathName can fail as files are not guaranteed to
have short name. This adds support for such case.

Fixes: https://github.com/libuv/libuv/issues/1258
PR-URL: https://github.com/libuv/libuv/pull/1267
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-26 20:43:51 +02:00
Andreas Hauptmann
9d94fd978f win: fix memory leak inside uv__pipe_getname
PR-URL: https://github.com/libuv/libuv/pull/1265
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-21 22:54:57 +01:00
Ben Noordhuis
87df1448a4 unix,windows: refactor request init logic
Fixes a TODO in src/threadpool.c.  Updates the Windows code to drop the
unused `loop` parameter in calls to uv_req_init().

PR-URL: https://github.com/libuv/libuv/pull/1091
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-21 16:14:09 +01:00
cjihrig
463800ffc1 win,sunos: stop handle on uv_fs_event_start() err
This commit stops the handle in uv_fs_event_start() when an
error occurs.

Fixes: https://github.com/libuv/libuv/issues/1253
PR-URL: https://github.com/libuv/libuv/pull/1257
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-21 10:35:53 -04:00
Ben Noordhuis
7e36c94e56 tools: add make_dist_html.py script
Add a script to generate the http://dist.libuv.org/ download page from
the tags in the git repository.  The HTML is a work of tearful beauty.

PR-URL: https://github.com/libuv/libuv/pull/1251
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-03-21 15:33:19 +01:00