Permalink
Commits on Nov 2, 2012
  1. unix: test: Add test for child process env vars

    AvianFlu committed Nov 2, 2012
    Test if the env is preserved when `options.env` is explicitly set to NULL.
Commits on Nov 1, 2012
  1. unix: do not set environ unless one is provided

    AvianFlu committed Nov 1, 2012
    Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
    `options.env` is `NULL`.  This results in child processes for whom `environ ==
    NULL`, which can cause a variety of unexpected issues.
Commits on Oct 29, 2012
  1. darwin: make it possible to compile for iOS

    lhecker committed with bnoordhuis Oct 25, 2012
    Relocate the include of TargetConditionals.h and fixe the use of
    TARGET_OS_IPHONE. Furthermore, uv__fsevents_init() and uv__fsevents_close are
    now empty functions for iOS, since the FSEvents API is not available there.
Commits on Oct 25, 2012
  1. windows: closing handles should always keep the loop alive

    piscisaureus committed Oct 25, 2012
    This makes the tcp-ref2 and udp-ref2 tests pass again.
    Also adds another reference count test.
  2. unix: fix ‘fd’ undeclared build error

    bnoordhuis committed Oct 25, 2012
    Reapplies commit b5028c5, failed to merge in 5cb4197.
  3. Merge branch 'v0.8'

    bnoordhuis committed Oct 25, 2012
  4. include: fix ngx_queue_foreach() macro

    bnoordhuis committed Oct 25, 2012
    Guard against the possibility that the queue is emptied while we're iterating
    over it. Simple test case:
    
      #include "ngx-queue.h"
      #include <assert.h>
    
      int main(void) {
        ngx_queue_t h;
        ngx_queue_t v[2];
        ngx_queue_t* q;
        unsigned n = 0;
        ngx_queue_init(&h);
        ngx_queue_insert_tail(&h, v + 0);
        ngx_queue_insert_tail(&h, v + 1);
        ngx_queue_foreach(q, &h) {
          ngx_queue_remove(v + 0);
          ngx_queue_remove(v + 1);
          n++;
        }
        assert(n == 1); // *not* 2
        return 0;
      }
    
    Fixes #605.
Commits on Oct 24, 2012
  1. benchmark: async_pummel should not call uv_async_send on closed handle

    piscisaureus committed Oct 24, 2012
    This fixes an assertion that triggered in debug builds on Windows.
  2. benchmark: timed_udp_pummel should not write to closed udp handle

    piscisaureus committed Oct 24, 2012
    This fixes intermittent assertion failures when running the benchmark.
  3. unix: reopen tty as /dev/tty

    bnoordhuis committed Oct 24, 2012
    Reopen the file descriptor when it refers to a tty. This lets us put the tty in
    non-blocking mode without affecting other processes that share it with us.
    
    Fixes #601.
  4. Revert "unix: avoid iterating over all async handles"

    bnoordhuis committed Oct 24, 2012
    This reverts commit 209abba.
    
    Fixes the following SIGSEGV:
    
      (gdb) f 1
      #1  0x00007fc084683aec in uv__async_io (loop=0x7fc0848e0b40,
      handle=0x7fc0848e0c78, events=1) at src/unix/async.c:175
      175             ASYNC_CB(h)
      (gdb) list
      170
      171         /* If we need to sweep all handles anyway - skip this loop */
      172         if (!loop->async_sweep_needed) {
      173           for (i = 0; i < end; i += sizeof(h)) {
      174             h = *((uv_async_t**) (buf + i));
      175             ASYNC_CB(h)
      176           }
      177         }
      178
      179         bytes -= end;
      (gdb) print *h
      $1 = {close_cb = 0x184e1b0, data = 0x18d9520, loop = 0x7fc0848e0b40,
      type = 49, handle_queue = {prev = 0x18dae10, next = 0x7860c0}, flags = 32,
      next_closing = 0x1863b40, pending = 0, async_cb = 0x31,
      queue = {prev = 0x18dae50, next = 0x7860c0}}
      (gdb)
    
    It looks like the async handle gets closed or otherwise becomes invalid before
    the sweep is executed.
    
    Fixes #603.
Commits on Oct 23, 2012
Commits on Oct 22, 2012
  1. linux: update comm field in uv_set_process_title()

    bnoordhuis committed Oct 22, 2012
    Makes the new process name visible in both `ps` and `ps a`, with the caveat
    that `ps` will only print the first 16 characters.
    
    Before this commit, `ps` kept reporting the old process name.
Commits on Oct 20, 2012
  1. linux: use /proc/cpuinfo for CPU frequency

    bnoordhuis committed Oct 20, 2012
    Obtain the CPU frequency from /proc/cpuinfo because there may not be any
    cpufreq info available in /sys. This also means that the reported CPU speed
    from now on is the *maximum* speed, not the *actual* speed the CPU runs at.
    
    This change only applies to x86 because ARM and MIPS don't report that
    information in /proc/cpuinfo.
    
    Fixes #588.
  2. unix: fix compiler warning in async.c

    bnoordhuis committed Oct 20, 2012
    Include missing <string.h> header. Fixes the following compiler warning:
    
      src/unix/async.c:182:7: warning: implicit declaration of
      function ‘memmove’ [-Wimplicit-function-declaration]
Commits on Oct 19, 2012
Commits on Oct 16, 2012
  1. windows: don't run signal tests

    piscisaureus committed Oct 11, 2012
    They are dummy tests on windows, running them is misleading.
    Also remove duplicate 'test-signal.c' entry from uv.gyp.
Commits on Oct 15, 2012
  1. test: change 10e8 to 1e9

    hnakamur committed with bnoordhuis Oct 15, 2012
    It is clearer and used everywhere else.
Commits on Oct 14, 2012
  1. unix: remove always_inline attribute

    bnoordhuis committed Oct 14, 2012
    Fixes the following gcc 4.7+ warning:
    
      ../src/unix/internal.h:105:13: warning: always_inline function might not be
      inlinable [-Wattributes]
    
    gcc wants the always_inline function to be annotated with the 'inline' keyword
    which we can't do because we compile in C89 mode.
    
    Using __inline is not an option because that makes clang generate warnings when
    -Wlanguage-extension-token is enabled.
    
    Therefore, remove the always_inline attribute altogether and hope that the
    compiler is smart enough to inline the functions.
Commits on Oct 11, 2012
  1. build: rename uv.a to libuv.a

    bnoordhuis committed Oct 11, 2012
Commits on Oct 10, 2012
  1. windows: fix application crashed popup in debug version

    piscisaureus committed Oct 10, 2012
    This is a backport of 2 patches by Ting-Yu Lin and Hiroaki Nakamura.
  2. darwin: work around concurrent write() kernel bug

    bnoordhuis committed Oct 10, 2012
    Simultaneously writing from multiple threads to the same file descriptor is not
    safe on OS X. We already serialized all pwrite() system calls, apply the same
    workaround to the write() system call.
    
    Fixes a node.js test, test/simple/test-fs-sir-writes-alot.js, that was failing
    because parts of the output file got filled with nul bytes.
Commits on Oct 9, 2012
  1. unix: remove unnecessary pthread_join ESRCH check

    bnoordhuis committed Oct 9, 2012
    ESRCH means the thread never got started but we guard against that now.
  2. uv.h: move gid and uid to the end of the uv_process_t struct

    txdv committed with piscisaureus Oct 5, 2012
    uv_gid_t and uv_uid_t have different sizes on different platforms.
    Moving them to the end of the struct is easier for bindings that use
    FFI.
Commits on Oct 7, 2012
  1. unix: don't reap threads if none were started

    bnoordhuis committed Oct 7, 2012
    Fixes a segmentation fault on 32 bits linux with glibc 2.15.
    
    Thanks to Johan Bergström (@jbergstroem) for reporting the issue and testing
    out the patch.