Commit Graph

2666 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
d7c8cffecb windows: fixed compilation warning 2014-02-18 11:35:01 +01:00
Marc Schlaich
8010bf9dd2 build, windows: fixed x64 configuration issue 2014-02-18 10:02:05 +01:00
Benjamin Saunders
7df24583e5 fs: vectored IO API for filesystem read/write
This improves API consistency with uv_read and uv_write and may
improve efficiency for some uses. Vectored IO is emulated when the
requisite system calls are unavailable.
2014-02-18 12:30:20 +04:00
Saúl Ibarra Corretgé
d4c12adff6 include: expose libuv version in header files 2014-02-17 20:53:20 +01:00
Alex Crichton
6f62d62c90 windows: always initialize uv_process_t
The unix implementation of uv_spawn always starts out with a
uv__handle_init, but the windows implementation sometimes bails out
early before calling uv__handle_init. This means that uv_close on a
failed uv_spawn will always succeed on unix but sometimes fail on
windows.

This commit lifts the initialization of the uv_process_t above all of
the error checking to ensure that uv_close will always work when
uv_spawn returns an error.
2014-02-16 13:09:54 +01:00
Alex Crichton
8692bbc254 windows: fix building on MinGW
The crtdbg.h header was added in c0716b3d, but MinGW does not have this
header present on the system. This commit takes the same approach of
2684f876a and just ignores this header and functionality on MinGW
2014-02-16 13:02:02 +01:00
Keno Fischer
a284b90c03 unix: correct error when calling uv_shutdown twice
Before this one of the requests was left as a ghost in the system.
See https://github.com/JuliaLang/julia/issues/5793
2014-02-15 16:37:58 +01:00
Saúl Ibarra Corretgé
107be2bed3 unix, windows: map EFBIG errno 2014-02-14 17:03:19 +01:00
Saúl Ibarra Corretgé
c8e4db6e00 include: mark close_cb field as private 2014-02-11 23:56:50 +01:00
Brian White
b738d315fb build: skip vcvarsall if already set up
Without this, running vcbuild repeatedly for some time will cause errors with msbuild saying the command line is too long (due to concatenation happening in vcvarsall).
2014-02-10 23:13:35 +01:00
Saúl Ibarra Corretgé
66ab38918c unix: call setgoups before calling setuid/setgid
Partial fix for #1093
2014-02-10 22:38:40 +01:00
Saúl Ibarra Corretgé
3901ec4976 unix: fix uv_tcp_nodelay return value in case of error
Fixes #1102
2014-02-10 09:00:46 +01:00
Saúl Ibarra Corretgé
419c2ffae7 test: fix udp multicast interface test 2014-02-10 08:56:39 +01:00
Sam Roberts
a3c0e48faa doc: describe signal send emulation on windows
Signals don't exist on Windows, but libuv emulates the behaviour of
several Unix signals. This wasn't documented, and the existing
documentation for signal reception emulation on Windows was worded as if
it applied to signal sending, which it does not.
2014-02-07 09:39:06 +01:00
Austin Foxley
451de61b72 unix, win: add uv_udp_set_multicast_interface() 2014-02-07 09:07:11 +01:00
Fedor Indutny
7301d21e46 gyp: qualify library variable
Use prefixed variable name for better control over dependencies.
2014-02-05 21:29:25 +04:00
Fedor Indutny
280469f4fe test: build spawn_fs_open only on unixes 2014-02-05 13:35:37 +04:00
Dylan Cali
60d621c607 gitignore: root test ignores at /test 2014-02-03 20:49:38 +04:00
Fedor Indutny
cb1cc25430 test: fix build on windows
disable spawn_fs_open
2014-02-01 04:57:16 +04:00
Fedor Indutny
6abe1e4b95 fs: uv__cloexec() opened fd
Every file descriptor opened using libuv should be automatically marked
as CLOEXEC to prevent it from leaking to a child process. Note that
since we are opening fds in a thread pool, there is a possible race
condition between `uv_spawn()` and the `open()` + `uv__cloexec()`. The
rwlock was added to avoid it.

see https://github.com/joyent/node/issues/6905
2014-02-01 01:02:37 +04:00
Dylan Cali
6c525df76d test: set getaddrinfo_fail timeout to 10000
getaddrinfo_fail can sometimes take slightly longer than the default
timeout of 5000. Set its timeout to 10000 to compensate, but leave the
timeout of all other tests at the default.
2014-02-01 00:50:40 +04:00
Dylan Cali
756087e017 test: support flexibly setting custom task options
Add a single TEST_ENTRY_CUSTOM hook that can be used to override task
entry defaults. Different tests can have different timeouts depending on
what is appropriate for each test. A separate TEST_OUTPUT_ENTRY hook is
no longer necessary.

In order to support per-task timeouts, the timeout field has been moved
into the task_entry_t struct. The default (5000) is now set as part of
TEST_ENTRY.
2014-02-01 00:50:40 +04:00
Fedor Indutny
513ce625ba Merge branch 'v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	src/unix/stream.c
	src/version.c
2014-01-31 20:59:49 +04:00
Oguz Bastemur
a6ff04d2c4 stream: start thread after assignments
Changed the order of the member assignments since the thread
may start before the parameters are assigned. This especially
happens when the osx scheduler is very busy.
2014-01-31 20:53:06 +04:00
Timothy J Fontaine
b0ec132aab Now working on v0.11.20 2014-01-29 09:43:38 -08:00
Timothy J Fontaine
336a182530 2014.01.30, Version 0.11.19 (Unstable)
Changes since version 0.11.18:

* linux: move sscanf() out of the assert() (Trevor Norris)

* linux: fix C99/C++ comment (Fedor Indutny)
2014-01-29 09:43:38 -08:00
Timothy J Fontaine
79ffe2fb95 Now working on v0.10.25 2014-01-29 09:41:41 -08:00
Timothy J Fontaine
aecd296b6b 2014.01.30, Version 0.10.24 (Stable)
Changes since version 0.10.23:

* linux: move sscanf() out of the assert() (Trevor Norris)

* linux: fix C99/C++ comment (Fedor Indutny)
2014-01-29 09:41:36 -08:00
Fedor Indutny
923e4ec619 Merge branch 'v0.10'
Conflicts:
	ChangeLog
	src/unix/linux-core.c
	src/version.c
2014-01-29 17:02:25 +04:00
Fedor Indutny
3e2446d18d linux: fix C99/C++ comment 2014-01-29 17:01:35 +04:00
Trevor Norris
7c8ff3bc25 linux: move sscanf() out of the assert()
If asserts are turned off then the sscanf() wouldn't have run, being
placed directly in the assert() itself.
2014-01-29 17:01:26 +04:00
Bert Belder
666aa2f068 Now working on v0.11.19 2014-01-22 21:37:37 +01:00
Bert Belder
d47962e9d9 2014.01.23, Version 0.11.18 (Unstable)
Changes since version 0.11.17:

* osx: Fix a possible segfault in uv__io_poll (Alex Crichton)

* windows: improved handling of invalid FDs (Alexis Campailla)

* doc: adding ARCHS flag to OS X build command (Nathan Sweet)

* tcp: reveal bind-time errors before listen (Alexis Campailla)

* tcp: uv_tcp_dualstack() (Fedor Indutny)

* linux: relax assumption on /proc/stat parsing (Luca Bruno)

* openbsd: fix obvious bug in uv_cpu_info (Fedor Indutny)

* process: close stdio after dup2'ing it (Fedor Indutny)

* linux: move sscanf() out of the assert() (Trevor Norris)
2014-01-22 21:37:34 +01:00
Bert Belder
278b58df20 Merge tag 'v0.10.23'
Conflicts:
	AUTHORS
	src/version.c
2014-01-22 21:33:46 +01:00
Bert Belder
a568ed6278 authors: add two addresses to .mailmap, fix their name in AUTHORS 2014-01-22 21:27:03 +01:00
Trevor Norris
74b29000be linux: move sscanf() out of the assert()
If asserts are turned off then the sscanf() wouldn't have run, being
placed directly in the assert() itself.
2014-01-23 00:21:44 +04:00
Fedor Indutny
37e12bdafb Revert "linux: silence uninitialized variable warning"
This reverts commit 5008f8de08.
2014-01-23 00:06:07 +04:00
Trevor Norris
5008f8de08 linux: silence uninitialized variable warning
When building using gyp and BUILDTYPE=Release using clang 3.4 received
this warning:

../src/unix/linux-core.c:640:34: warning: variable 'n' is uninitialized
      for (len = sizeof("cpu0"); n /= 10; len++);
                                 ^

Initializing n = 0 silences this build warning.
2014-01-22 20:59:23 +01:00
Bert Belder
b8b6588dbe Now working on v0.10.24 2014-01-22 20:30:26 +01:00
Bert Belder
dbd218e699 2014.01.23, Version 0.10.23 (Stable)
Changes since version 0.10.22:

* linux: relax assumption on /proc/stat parsing (Luca Bruno)

* openbsd: fix obvious bug in uv_cpu_info (Fedor Indutny)

* process: close stdio after dup2'ing it (Fedor Indutny)
2014-01-22 20:30:14 +01:00
Fedor Indutny
3a4ec61d46 test: fix after merge 2014-01-22 23:00:49 +04:00
Bert Belder
53effc3dd8 Merge branch 'v0.10'
Conflicts:
	ChangeLog
	src/unix/process.c
	src/version.c
2014-01-22 19:49:24 +01:00
Fedor Indutny
e403a2c486 process: close stdio after dup2'ing it
Thus allow passing the same file descriptor as the source of multiple
stdios.

Committed with the help and code parts from:

  * Sam Roberts <sam@strongloop.com>

fix #1074
2014-01-22 22:39:08 +04:00
Fedor Indutny
8bc29b6f5f openbsd: fix obvious bug in uv_cpu_info
`int which[]` should not be static here, as the function itself is
changing it

fix joyent/node#6878
2014-01-21 15:06:30 +04:00
Luca Bruno
993151bc40 linux: relax assumption on /proc/stat parsing
CPU entries in /proc/stat are not guaranteed to be monotonically
increasing, asserting on this assumption can break in cases such
as the UltraSparc II machine shown in #1080.

Signed-off-by: Luca Bruno <lucab@debian.org>
2014-01-20 08:45:34 -08:00
Fedor Indutny
8f15aae52f tcp: uv_tcp_dualstack()
Explicitly disable/enable dualstack depending on presence of flag set by
uv_tcp_dualstack() function.
2014-01-19 23:07:42 +00:00
Alexis Campailla
d1e6be1460 tcp: reveal bind-time errors before listen
Changed uv_tcp_duplicate_socket to reveal any bind-time errors
before calling listen().

This fix is 100% windows specific.

It helps fix Node.js unite test test-cluster-bind-twice on Windows.
2014-01-16 15:48:30 +00:00
Nathan Sweet
acb9f8951e doc: adding ARCHS flag to OS X build command
Adding further instructions about building for OS X, as recent versions
of xcodebuild will automatically build for i386 (can someone say,
"monoculture") even on x86_64 machines! Specifically including
instructions about including the "ARCHS" flag to specify the right
architecture.

This is trivial, but will save people time.
2014-01-13 17:43:25 +00:00
Alexis Campailla
c0716b3d9f windows: improved handling of invalid FDs
If passed and invalid FD, _get_osfhandle() sets an error code
through errno, not _doserrno. Hence we need to use
SET_REQ_WIN32_ERROR insted of SET_REQ_RESULT.

In debug builds, _get_osfhandle() also raises a superfluous
assert. I implemented a wrapper that disables all asserts
around the call to _get_osfhandle().

This fixes node.js unit tests test-fs-read-stream.js and
test-listen-fd-ebadf.js.
2014-01-09 18:29:18 +01:00
Timothy J Fontaine
97eda7fd62 Now working on v0.10.23 2014-01-07 14:03:18 -08:00