1. 18 Dec, 2013 2 commits
    • Timothy J Fontaine's avatar
      2013.12.19, Version 0.10.21 (Stable) · 375ebce0
      Timothy J Fontaine authored
      Changes since version 0.10.20:
      
      * unix: fix a possible memory leak in uv_fs_readdir (Alex Crichton)
      375ebce0
    • Alex Crichton's avatar
      unix: fix a possible memory leak in uv_fs_readdir · 7c6bddbe
      Alex Crichton authored
      Some scandir implementations allocate the dirent struct even if the
      directory is empty, so if `scandir` returns 0 there may still be memory
      that needs to get deallocated. I have altered uv__fs_readdir to go to
      the "deallocation exit area" when 0 files are found in the directory
      and continue to return early on a return value of -1.
      
      I went to add a test for this functionality, but it appears that one
      already exists (reading an empty directory), so I imagine that the
      valgrind builds must only be happening on linux instead of OSX as well?
      I have confirmed manually that a program without this fix will
      infinitely leak memory, and with this fix the memory usage stays
      constant.
      7c6bddbe
  2. 12 Dec, 2013 2 commits
  3. 30 Nov, 2013 2 commits
  4. 27 Nov, 2013 1 commit
  5. 25 Nov, 2013 3 commits
  6. 13 Nov, 2013 1 commit
  7. 12 Nov, 2013 4 commits
    • Timothy J Fontaine's avatar
      Now working on v0.10.20 · 1578a5a3
      Timothy J Fontaine authored
      1578a5a3
    • Timothy J Fontaine's avatar
      2013.11.13, Version 0.10.19 (Stable) · 33959f75
      Timothy J Fontaine authored
      Changes since version 0.10.18:
      
      * darwin: avoid calling GetCurrentProcess (Fedor Indutny)
      
      * unix: update events from pevents between polls (Fedor Indutny)
      
      * fsevents: support japaneese characters in path (Chris Bank)
      
      * linux: don't turn on SO_REUSEPORT socket option (Ben Noordhuis)
      
      * build: fix windows smp build with gyp (Geert Jansen)
      
      * linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT (Ben Noordhuis)
      
      * unix: fix reopened fd bug (Fedor Indutny)
      
      * core: fix fake watcher list and count preservation (Fedor Indutny)
      33959f75
    • Fedor Indutny's avatar
      core: fix fake watcher list and count preservation · f50ccd52
      Fedor Indutny authored
      Fake watcher list and count should be preserved only if
      `loop->watchers` was already allocated.
      f50ccd52
    • Fedor Indutny's avatar
      unix: fix reopened fd bug · bbccafbe
      Fedor Indutny authored
      When fd is closed and new one (with the same number) is opened inside
      kqueue/epoll/port loop's callback - stale events might invoke callbacks
      on wrong watchers.
      
      Check if watcher was changed after invocation and invalidate all events
      with the same fd.
      
      fix #826
      bbccafbe
  8. 08 Nov, 2013 1 commit
    • Ben Noordhuis's avatar
      linux: handle EPOLLHUP without EPOLLIN/EPOLLOUT · 0c76cdb9
      Ben Noordhuis authored
      Work around an epoll quirk where it sometimes reports just the EPOLLERR
      or EPOLLHUP event.  In order to force the event loop to move forward,
      we merge in the read/write events that the watcher is interested in;
      uv__read() and uv__write() will then deal with the error or hangup in
      the usual fashion.
      
      Fixes #982.
      
      This is a back-port of commit 24bfef2e from the master branch.
      0c76cdb9
  9. 05 Nov, 2013 1 commit
  10. 30 Oct, 2013 1 commit
    • Ben Noordhuis's avatar
      linux: don't turn on SO_REUSEPORT socket option · 3d2c820a
      Ben Noordhuis authored
      On the BSDs, SO_REUSEPORT is pretty much SO_REUSEADDR with some special
      casing for IP multicast.  When two processes (that don't do multicast)
      bind to the same address, only the last one receives traffic.  It allows
      one to "steal" the bound address from another process.  (Both processes
      have to enable SO_REUSEPORT though, so it only works in a cooperative
      setting.)
      
      On Linux however, it enables port sharing, not stealing - both processes
      receive a share of the traffic.  This is a desirable trait but pre-3.9
      kernels don't support the socket option and a libuv program therefore
      behaves differently with older kernels or on another platform.
      
      This is a back-port of commit 9d60f1eb from the master branch.
      
      Fixes joyent/node#6454.
      3d2c820a
  11. 02 Nov, 2013 1 commit
  12. 30 Oct, 2013 2 commits
  13. 28 Oct, 2013 1 commit
  14. 18 Oct, 2013 3 commits
  15. 05 Oct, 2013 1 commit
    • Ben Noordhuis's avatar
      unix: revert recent FSEvent changes · 38df93cf
      Ben Noordhuis authored
      This commit reverts the following commits:
      
          983fa68e darwin: fix 10.6 build error in fsevents.c
          684e2124 fsevents: use shared FSEventStream
          ea4cb778 fsevents: FSEvents is most likely not thread-safe
          9bae606d darwin: create fsevents thread on demand
      
      Several people have reported stability issues on OS X 10.8 and bus
      errors on the 10.9 developer preview.
      
      See also joyent/node#6296 and joyent/node#6251.
      38df93cf
  16. 02 Oct, 2013 2 commits
  17. 28 Sep, 2013 2 commits
    • Ben Noordhuis's avatar
      Revert "unix: set O_NONBLOCK in uv_pipe_open()" · 8c9cbee1
      Ben Noordhuis authored
      It turns out that node.js relies on the blocking behavior of pipes in
      some cases, notably when forking worker processes.  Reopens #941.
      
      This reverts commit 8fe4ca68.
      8c9cbee1
    • Ben Noordhuis's avatar
      unix: set O_NONBLOCK in uv_pipe_open() · 8fe4ca68
      Ben Noordhuis authored
      Don't rely on the caller to set the O_NONBLOCK flag on the file
      descriptor.
      
      Prevents sporadic stalls when the file descriptor is in blocking mode
      and exactly as many bytes are read as there are available; in that case,
      libuv will try to read again and block.  Node.js was guilty of this.
      
      Fixes #941.
      8fe4ca68
  18. 24 Sep, 2013 2 commits
  19. 05 Sep, 2013 7 commits
    • Ben Noordhuis's avatar
      darwin: fix 10.6 build error in fsevents.c · 983fa68e
      Ben Noordhuis authored
      Work around an 'initializer element is not constant' build error in
      src/unix/fsevents.c by turning the const int flags into #defines.
      
      Only an issue on OS X 10.6 due to the old compiler it uses.
      
      Fixes #908.
      
      This is a back-port of commit 82f2472b from the master branch.
      983fa68e
    • Ben Noordhuis's avatar
      build: remove GCC_WARN_ABOUT_MISSING_NEWLINE · 712835a6
      Ben Noordhuis authored
      Not compatible with non-Apple gcc builds.  Fixes the following build
      error:
      
          gcc-4.8: error: unrecognized command line option '-Wnewline-eof'
      712835a6
    • Bert Belder's avatar
      Now working on v0.10.17 · 7e5c63c8
      Bert Belder authored
      7e5c63c8
    • Bert Belder's avatar
      2013.09.06, Version 0.10.16 (Stable) · 2bce230d
      Bert Belder authored
      Changes since version 0.10.15:
      
      * windows: make uv_shutdown() for write-only pipes work (Bert Belder)
      
      * windows: make uv_fs_open() report EINVAL when invalid arguments are
        passed (Bert Belder)
      
      * windows: make uv_fs_open() report _open_osfhandle() failure correctly
        (Bert Belder)
      
      * windows: make uv_fs_chmod() report errors correctly (Bert Belder)
      
      * windows: wrap multi-statement macros in do..while block (Bert Belder)
      2bce230d
    • Bert Belder's avatar
      windows/fs: handle _open_osfhandle() failure correctly · faf2c593
      Bert Belder authored
      Until now we assumed that _open_osfhandle() would set _doserrno on
      failure. This assumption was very wrong in one obvious case, namely when
      the CRT file descriptor table would fill up. In that case errno is set
      to EMFILE, but GetLastError() returns zero - which makes sense because
      it's not a win32 error but rather a CRT problem.
      faf2c593
    • Bert Belder's avatar
      windows/fs: make uv_fs_open() report EINVAL correctly · 812717d0
      Bert Belder authored
      Before, when the user passed an invalid paramter to uv_fs_open, libuv
      would detect this and call SET_REQ_RESULT to set the result value to -1.
      SET_REQ_RESULT then stored whatever error code was returned by
      GetLastError(), which would have no relationship to the actual problem,
      and might as well be zero.
      812717d0
    • Bert Belder's avatar
      39bef329
  20. 29 Aug, 2013 1 commit
    • Bert Belder's avatar
      windows: make uv_shutdown() for write-only pipes work · 61b20e8d
      Bert Belder authored
      A couple of issues prevented uv_shutdown() from working correctly with
      write-only pipes.
      
        * The pipe handle wasn't opened with the right permissions, so an
          attempt to probe the state of the write buffer would fail with
          ERROR_ACCESS_DENIED.
      
        * The pipe flags for child process stdio pipes were always set to
          UV_HANDLE_READABLE and UV_HANDLE_WRITABLE, even in cases where it
          was actually half-duplex.
      
        * There was no code path that lead to closing the pipe handle if the
          pipe was write-only.
      61b20e8d