Changes since version 0.11.1:
* darwin: look up file path with F_GETPATH (Ben Noordhuis)
* unix, windows: add uv_has_ref() function (Saúl Ibarra Corretgé)
* build: avoid double / in paths for dtrace (Timothy J. Fontaine)
* unix: remove src/unix/cygwin.c (Ben Noordhuis)
* windows: deal with the fact that GetTickCount might lag (Bert Belder)
* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)
* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)
Added two new flags to identify tests that are intentionally ignored
(usually because we don't want to implement the tested functionality
on current platform) and test serving as TODO list (usually indicating
that the tested functionality should be implemented on current plaform
in the near future.)
Fix a potential use-after-free bug where the uv__io watcher struct is
referenced after being disabled by its callback function. The stress
is on 'potential' because in practice the watcher's memory is not
released until the next tick of the event loop.
Rename it to darwin-getproctitle.c, it doesn't need an Objective-C
compiler. Fix up -Wpedantic warnings about void to function pointer
casts and include <ApplicationServices/ApplicationServices.h> to get
the GetCurrentProcess() function prototype.
On Linux, the accept() and accept4() system calls checks for EMFILE
before checking for EAGAIN. Refine our EMFILE error handling tactic
to deal with that. Here is what used to happen:
1. The event loop calls accept() and sees EMFILE.
2. Libuv switches to EMFILE error handling mode. It closes a stashed
file descriptor and calls accept() again.
3. The accept() system call fails with EAGAIN.
4. Libuv reopens the stashed file descriptor (reaching RLIMIT_NOFILE
again) and returns control to the regular event loop.
5. The regular event loop calls accept(), sees EMFILE and jumps to
step 2 again. Effectively an infinite loop.
Avoid that by not calling accept() again when we've seen EAGAIN.
Fixesjoyent/node#5389.
After latest twiddling, `stream->io_watcher.fd` doesn't contain a real
stream's file descriptior anymore. The one from `select_state` should be
used instead.
Zero-initialize `select_state->event` field.
RSS is a reflection of the number of pages that a process has mapped.
glibc implements fopen() in terms of mmap() which means that trying
to read the number of mapped pages changes it. Switch to open().
Fix the following two warnings:
src/unix/core.c:74:1: warning: ISO C90 forbids array
'static_assert_failed' whose size can't be evaluated [-Wvla]
src/unix/core.c:76:1: warning: ISO C90 forbids array
'static_assert_failed' whose size can't be evaluated [-Wvla]
We use GetQueuedCompletionStatus(Ex) to sleep the thread until the next
timer expires (provided that no other events happen before that).
However after waking up from a sleep the GetTickCount() return value may
not immediately reflect that some time has passed. This happens because
gqcs can sometimes sleep for periods shorter than the GetTickCount clock
resulution. This patch changes time tracking so the amount of time
waited by gqcs is taken into account.
This has the following advantages:
* Excessive loop iterations are avoided.
* Small timeouts are fired more precisely.
* The `loop-stop` test that used to be flaky on Windows now passes
consistently.
Add a compiler check because turning on the option unconditionally
breaks the build when CC=gcc.
This should also fix the build on versions of OS X that predate Apple's
switch to clang (10.6 and older.)
This is the first versioned release from the current unstable libuv
branch.
Changes since Node.js v0.11.0:
* all platforms: nanosecond resolution support for uv_fs_[fl]stat
(Timothy J. Fontaine)
* all platforms: add netmask to uv_interface_address (Ben Kelly)
* unix: make sure the `status` parameter passed to the `uv_getaddrinfo`
is 0 or -1 (Ben Noordhuis)
* unix: limit the number of iovecs written in a single `writev` syscall
to IOV_MAX (Fedor Indutny)
* unix: add dtrace probes for tick-start and tick-stop (Timothy J.
Fontaine)
* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)
* windows: fix memory leak in fs__sendfile (Shannen Saez)
* windows: fix edge case bugs in uv_cpu_info (Bert Belder)
* include: no longer ship with / include ngx-queue.h (Ben Noordhuis)
* include: remove UV_VERSION_* macros from uv.h (Ben Noordhuis)
* documentation updates (Kristian Evensen, Ben Kelly, Ben Noordhuis)
* build: fix dtrace-enabled builds (Ben Noordhuis, Timothy J. Fontaine)
* build: gyp disable thin archives (Timothy J. Fontaine)
* build: add support for Visual Studio 2012 (Nicholas Vavilov)
Fixes a couple of error handling issues:
* Don't free an uninitialized pointer when allocating memory for
`cpu_infos` fails.
* Don't return a bogus error value when NtQuerySystemInformation fails.
That function returns an NTSTATUS code instead of setting the last
error.
* Don't clobber out parameters when an error happens.
Include the netmask when returning information about the OS network
interfaces.
This commit provides implementations for windows and those unix
platforms using getifaddrs().
AIX was not implemented because it requires the use of ioctls and I do
not have an AIX development/test environment. The windows code was
developed using mingw on winxp as I do not have access to visual studio.
Tested on darwin (ipv4/ipv6) and winxp (ipv4 only). Needs testing on
newer windows using ipv6 and other unix platforms.