Commit Graph

2222 Commits

Author SHA1 Message Date
isaacs
ab157df5ee Now working on v0.11.3 2013-05-10 15:19:35 -07:00
isaacs
3fba0bf65f 2013.05.11, Version 0.11.2 (Unstable)
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)
2013-05-10 15:19:32 -07:00
Ben Noordhuis
ce580cc057 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	ChangeLog
2013-05-08 15:46:54 -07:00
Miroslav Bajtoš
2c21050956 test: add RETURN_SKIP and RETURN_TODO macros
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.)
2013-05-08 15:43:54 -07:00
Ben Noordhuis
4a8ec0c622 sunos: handle disabled watcher after callback
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.
2013-05-07 14:49:58 -07:00
Ben Noordhuis
9b801d551b darwin: rename darwin-getproctitle.m
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.
2013-05-02 14:10:12 +02:00
Daisuke Murase
4b0fac8990 darwin: fix unnecessary include headers
This file doesn't use any Cocoa functions, CoreFoundation.h is enough here.
This line causes compilation error on iOS environment.
2013-05-02 13:55:40 +02:00
Ben Noordhuis
ebdeaed2e3 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	ChangeLog
	src/version.c
2013-05-02 09:22:39 +02:00
Ben Noordhuis
b3ab332b34 unix: fix EMFILE error handling
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.

Fixes joyent/node#5389.
2013-05-01 19:37:45 +02:00
Fedor Indutny
67f9b91a8b stream: use harder sync restrictions for osx-hack
Synchronize harder to avoid excessive spins, invokations of async
callback and sporadic assertion failures on double-call of async
callback.
2013-04-30 14:07:30 +04:00
Ben Noordhuis
4e5b8dc2ef build: link with libkvm on openbsd
The Makefile already did and now the gyp build does too. Fixes the
OpenBSD build of node.js.

Fixes joyent/node#5363.
2013-04-29 13:40:12 +02:00
Fedor Indutny
ac4e7e7ff2 stream: fix small nit in select hack, add test 2013-04-27 18:50:55 +02:00
Fedor Indutny
2400716d87 stream: fix osx select hack
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.
2013-04-24 13:21:58 +02:00
Ben Noordhuis
c77707984d include: fix typo in comment in uv.h
Fixes #790.
2013-04-24 11:34:55 +02:00
isaacs
a0cb926e2e Now working on v0.10.6 2013-04-22 17:37:25 -07:00
Bert Belder
f6fb1dfef1 ChangeLog: fix incorrect release date 2013-04-22 17:37:22 -07:00
isaacs
6595a7732c 2013.04.24, Version 0.10.5 (Stable)
Changes since version 0.10.4:

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* windows: make timers handle large timeouts (Miroslav Bajtoš)

* windows: remove superfluous assert statement (Bert Belder)

* unix: silence STATIC_ASSERT compiler warnings (Ben Noordhuis)

* linux: don't use fopen() in uv_resident_set_memory() (Ben Noordhuis)
2013-04-22 17:37:22 -07:00
Ben Noordhuis
cd10637d0b linux: don't use fopen() in uv_resident_set_memory()
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().
2013-04-22 08:26:53 +02:00
Ben Noordhuis
105e4dcb23 unix: silence STATIC_ASSERT compiler warnings
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]
2013-04-22 07:48:09 +02:00
Bert Belder
ffe2ef06eb windows: deal with the fact that GetTickCount might lag
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.
2013-04-18 23:39:16 +02:00
Ben Noordhuis
7f8130a21b unix: remove src/unix/cygwin.c
The cygwin build has been broken for a long time now and no one is
complaining, which strongly suggests that no one actually uses it.
Remove it.
2013-04-18 21:53:33 +02:00
Bert Belder
79f96298c1 Merge branch 'v0.10' 2013-04-18 02:58:44 +02:00
Bert Belder
a3963883b8 windows: remove superfluous assert statement 2013-04-18 02:56:07 +02:00
Timothy J Fontaine
2d89b4b14f build: avoid double / in paths for dtrace
GYP doesn't resolve or normalize the paths, resulting in the action not
firing if the path contains // so take care to avoid that
2013-04-18 01:44:11 +02:00
Saúl Ibarra Corretgé
a92b66fe33 unix, windows: add uv_has_ref() function 2013-04-17 15:31:08 +02:00
Miroslav Bajtoš
09ff5100e3 windows: make timers handle large timeouts
Fixes a bug where timers with very large timeouts run on the next tick.
Based on a similar bug fix for unix (9b61939).

Fixes joyent/node#5101.
2013-04-16 16:30:33 +02:00
Ben Noordhuis
ef85bdaffb unix: silence STATIC_ASSERT compiler warnings
Newer versions of gcc complain about the definition of the zero element
array. Squelch that warning by turning it into a one element array.
2013-04-12 19:40:57 +02:00
Bert Belder
aa23eea5cf Merge branch 'v0.10' 2013-04-12 13:20:30 +02:00
isaacs
5ed1d02cc0 Now working on v0.10.5 2013-04-11 09:00:10 -07:00
isaacs
85827e2640 2013.04.12, Version 0.10.4 (Stable)
Changes since version 0.10.3:

* include: update uv_backend_fd() documentation (Ben Noordhuis)

* unix: include uv.h in src/version.c (Ben Noordhuis)

* unix: don't write more than IOV_MAX iovecs (Fedor Indutny)

* mingw-w64: don't call _set_invalid_parameter_handler (Nils Maier)

* build: gyp disable thin archives (Timothy J. Fontaine)

* sunos: re-export entire library when static (Timothy J. Fontaine)

* unix: dtrace probes for tick-start and tick-stop (Timothy J. Fontaine)

* windows: fix memory leak in fs__sendfile (Shannen Saez)

* windows: remove double initialization in uv_tty_init (Shannen Saez)

* build: fix dtrace-enabled out of tree build (Ben Noordhuis)

* build: squelch -Wdollar-in-identifier-extension warnings (Ben
  Noordhuis)

* inet: snprintf returns int, not size_t (Brian White)

* win: refactor uv_cpu_info (Bert Belder)

* build: add support for Visual Studio 2012 (Nicholas Vavilov)

* build: -Wno-dollar-in-identifier-extension is clang only (Ben
  Noordhuis)
2013-04-11 09:00:06 -07:00
Ben Noordhuis
0ff06b4ac3 build: -Wno-dollar-in-identifier-extension is clang only
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.)
2013-04-10 23:46:24 +02:00
Ben Noordhuis
145f7b3560 darwin: look up file path with F_GETPATH
Look up the file path with fcntl(F_GETPATH) and pass it to
the uv_fs_event_cb callback.
2013-04-10 19:45:43 +02:00
Bert Belder
fcac38abe4 Now working on v0.11.2 2013-04-10 19:43:10 +02:00
Bert Belder
5c10e82ae0 2013.04.11, Version 0.11.1 (Unstable)
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)
2013-04-10 19:43:07 +02:00
mscdex
633d33a92a cygwin: remove unused variable 2013-04-10 18:30:37 +02:00
Bert Belder
db1a8b85d2 Merge branch 'v0.10' 2013-04-10 17:53:10 +02:00
Bert Belder
1d5c61a8b3 windows: simplify netmask detection in uv_interface_addresses 2013-04-10 17:33:37 +02:00
Nicholas Vavilov
bc5fa794b9 build: add support for Visual Studio 2012
Closes #722
2013-04-10 16:13:32 +02:00
Bert Belder
a9bce29f0c win: refactor uv_cpu_info
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.
2013-04-10 16:04:15 +02:00
Brian White
9021dbcd8d inet: snprintf returns int, not size_t 2013-04-10 15:50:39 +02:00
Brian White
4d4f1496d9 windows, unix: remove dead code 2013-04-10 15:50:39 +02:00
Ben Noordhuis
8041c52fcd unix: style fixups 2013-04-10 14:59:02 +02:00
Ben Kelly
14aa6153be unix, win: add netmask to uv_interface_address
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.
2013-04-10 14:48:23 +02:00
Ben Noordhuis
8ea49c1223 build: squelch -Wdollar-in-identifier-extension warnings
The dtrace probes contain dollar signs. We know, llvm-gcc, and we don't
care. Suppress the warnings.
2013-04-10 14:31:39 +02:00
Ben Noordhuis
f78bcfbd6a Merge remote-tracking branch 'origin/v0.10' 2013-04-10 14:24:18 +02:00
Ben Noordhuis
bad707db3f gitigore: ignore auto-generated uv-dtrace.h header 2013-04-10 14:23:55 +02:00
Ben Noordhuis
be5b16aabd build: fix dtrace-enabled out of tree build 2013-04-10 14:23:55 +02:00
Shannen Saez
603915dd00 windows: remove double initialization in uv_tty_init 2013-04-10 14:17:28 +02:00
Shannen Saez
7570a35b70 windows: fix memory leak in fs__sendfile 2013-04-10 14:17:28 +02:00
Timothy J Fontaine
e1ffc6c0ee unix: dtrace probes for tick-start and tick-stop 2013-04-10 14:10:05 +02:00