Commit Graph

567 Commits

Author SHA1 Message Date
Maciej Małecki
edb40b16ce unix: map EROFS to UV_EROFS
Conflicts:

	src/unix/error.c
2012-05-01 16:52:48 +02:00
Fedor Indutny
0efa3cf4d3 err: handle EIO errors on win/unix 2012-05-01 16:43:00 +02:00
Bert Belder
32f6f6e2c7 Windows: map ERROR_NOT_SAME_DEVICE to UV_EXDEV 2012-05-01 16:20:52 +02:00
Bert Belder
d41cc9118d Windows: uv_spawn2 reports the wrong error when setuid/setgid is specified 2012-04-27 21:58:44 +02:00
Bert Belder
aea5db5da1 Windows: add mappings for UV_ENOENT 2012-04-27 21:24:27 +02:00
Bert Belder
c42ba103b7 Temporary API to support spawn with uid and gid options 2012-04-27 17:41:56 +02:00
Ben Noordhuis
06ae804e03 linux: add IN_MOVE_SELF to inotify event mask
Partially fixes joyent/node#3172, behavior is now consistent with inotifywait.
2012-04-25 01:27:43 +02:00
Igor Zinkovsky
e6d4bca2ec remove left-over cast fixes #3160 2012-04-23 10:52:53 -07:00
Ben Noordhuis
21bee8c36f unix: call pipe handle connection cb on accept() error 2012-04-22 19:32:47 +02:00
Ben Noordhuis
cf6dc082ca unix: handle EWOULDBLOCK in uv__read() 2012-04-22 19:32:47 +02:00
Ben Noordhuis
01cc491853 unix: handle EWOULDBLOCK in uv__write() 2012-04-22 19:32:47 +02:00
Ben Noordhuis
df22d5935e unix: handle EWOULDBLOCK in uv__server_io() 2012-04-22 19:32:46 +02:00
Ben Noordhuis
73cc3677fc unix: map EWOULDBLOCK to UV_EAGAIN 2012-04-22 19:32:46 +02:00
isaacs
f9fcaf5ccf Map ENOMEM to UV_ENOMEM 2012-04-20 08:16:55 -07:00
Ben Noordhuis
d68b3d960b unix: add uv_fs_read64, uv_fs_write64 and uv_fs_ftruncate64 2012-04-06 01:47:18 +02:00
Igor Zinkovsky
ea50126358 add 64bit offset fs functions 2012-04-05 16:01:29 -07:00
Bert Belder
3506cd1dc5 Windows: don't report ENOTSOCK when attempting to bind an udp handle twice 2012-04-05 17:25:21 +02:00
Bert Belder
cda7a28039 Windows: backport pipe-connect-to-file fixes from master
Conflicts:

    src/win/pipe.c


commit e53ab6675ba12d97ad6d93c9913a473ba5172617
Author: Bert Belder <bertbelder@gmail.com>
Date:   Fri Mar 9 17:04:03 2012 +0100

    Windows: report UV_ENOTSOCK when we opened a file instead of a pipe

    Makes the pipe_connect_to_file test pass on Windows.

commit 8cbbfbe4c6489868470a7e410f80d4729f4091bf
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date:   Thu Mar 1 14:32:59 2012 -0800

    test: make pipe_connect_to_file succeed with ECONNREFUSED

commit 6bbccf1fe0
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date:   Thu Mar 1 12:11:12 2012 -0800

    windows: return UV_ENOTSOCK when doing uv_pipe_connect to a file
2012-04-05 16:47:49 +02:00
Bert Belder
1795427ab0 Windows: never call fs event callbacks after closing the watcher 2012-03-27 23:00:26 +02:00
Ben Noordhuis
8409a6765b unix: ignore ECONNABORTED errors from accept()
ECONNABORTED means that the connection was torn down by the peer before the
TCP handshake completed. Ignore it, there's nothing we can do and it simplifies
error handling for libuv users.
2012-03-21 15:42:29 -07:00
Bert Belder
4ae316bcc9 Windows: fix compiler warnings 2012-03-16 02:38:37 +01:00
Bert Belder
163d8de392 Add UV_ENOSPC and mappings to it
Closes GH-337
2012-03-16 02:32:06 +01:00
Ben Noordhuis
66a959c405 linux: try inotify_init if inotify_init1 returns ENOSYS
The kernel may be older than the kernel headers that libuv is compiled against.
2012-03-15 01:09:16 +01:00
Bert Belder
5d21056277 Windows: make sure that shutdown_cb is always called
This patch changes how uv-win uses the UV_SHUTTING and UV_SHUT flags.
UV_SHUT is now only used for tcp handles to track whether shutdown() has
actually been called. UV_SHUTTING has the more generic meaning of
"no longer readable". It would be good to replace it by an actual
UV_READABLE flag in the future.

This makes the shutdown_close_tcp and shutdown_close_pipe tests pass on
windows.
2012-03-09 16:31:16 +01:00
Bert Belder
95296dfa3c Windows: make the refcount tests pass 2012-03-09 16:31:15 +01:00
Bert Belder
18823270aa Windows: fix connecting a pipe in the thread pool
The code didn't function. Fixes the pipe_pound benchmarks.
2012-03-09 16:31:15 +01:00
Bert Belder
ec97ba8014 Windows uv_fs_stat: cap st_nlink to SHRT_MAX 2012-03-09 05:00:10 +01:00
Bert Belder
87752ac38b Fold trailing whitespace 2012-03-09 05:00:09 +01:00
Bert Belder
f43f1a7016 Windows: avoid uv_guess_handle crash in when fd < 0
Happens only when using a debug version of the crt.
2012-03-08 16:43:56 +01:00
Bert Belder
1ac71a31e9 Map EBUSY and ENOTEMPTY errors 2012-03-07 21:26:37 +01:00
Ben Noordhuis
b3fe183040 unix: fix fs_event refcount bug on darwin
The event loop got unref'd twice when the handle was closed.
2012-03-01 16:42:05 +01:00
Ben Noordhuis
44c9f63cb1 unix: don't rely on libev to track timer state
An obscure libev bug sometimes makes it miss state changes. Keep track of the
state ourselves.

Fixes joyent/node#2515.
2012-03-01 16:41:58 +01:00
Igor Zinkovsky
9a5c1bad90 windows: fix time conversion in stat 2012-02-27 13:11:09 -08:00
Brandon Philips
fca18c33ac win: fs: handle EOF in read
in luvit after upgrade libuv from 243cfc to d3efef readSync started
failing.  It seems that the code cleanup stopped handling EOF

Trivially reproduced with this

    local fs = require('fs')
    print(fs.readFileSync('foo.luvit'))
2012-02-24 00:58:53 +01:00
Igor Zinkovsky
c0e7044862 windows: avoid IOCP short-circuit if non-ifs lsps are detected 2012-02-22 11:58:40 -08:00
Bert Belder
86ebe48660 Windows: add error mappings that map to EPIPE 2012-02-16 23:58:14 +01:00
Ben Noordhuis
b8649fdf00 unix: don't flush tty on switch to raw mode
Drain, don't flush the tty when switching from cooked to raw mode. Prevents
buffered keystrokes from getting lost. Switching back to cooked mode still
flushes.

Fixes joyent/node#2744.
2012-02-13 22:41:36 +01:00
Bert Belder
bc8b99097a win: add ERROR_FILENAME_EXCED_RANGE mapping, fix fs_file_nametoolong test 2012-02-13 20:01:36 +01:00
Bert Belder
6c80bf34d3 Clean up error handling in win/fs.c, add some error mappings 2012-02-13 20:01:19 +01:00
Ben Noordhuis
c1cea705ba windows: map WSAETIMEDOUT to UV_ETIMEDOUT 2012-02-13 14:08:27 +01:00
Igor Zinkovsky
f9be43a564 support half-duplex pipes 2012-02-09 13:33:15 -08:00
Luis Lavena
c800043112 Add missing IPV6_HOPLIMIT definition for MinGW
Closes GH-307
2012-02-07 14:34:40 +01:00
Nathan Rajlich
dbc046cb7f Add EXDEV to the errno map. 2012-02-06 21:32:16 +01:00
Bert Belder
443445a3c6 Windows: reset brightness when reverting to default text color 2012-02-05 19:54:26 +01:00
Maciej Małecki
e2565c332a win: map ERROR_CANT_RESOLVE_FILENAME to UV_ENAMETOOLONG 2012-02-03 22:20:14 +01:00
Maciej Małecki
3ff3626e52 unix: map ELOOP to UV_ELOOP 2012-02-03 22:20:14 +01:00
Ben Noordhuis
2f182f4451 unix: map ECONNABORTED 2012-02-03 16:20:24 +01:00
Bert Belder
267e75dda2 Windows: better stat implementation 2012-02-02 17:03:40 +01:00
Igor Zinkovsky
495853ee2b windows: map ERROR_ACCESS_DENIED to UV_EPERM 2012-02-01 12:38:14 -08:00
Brandon Philips
4cfda74de4 uv.h: add EPERM to errno map to fix regression
EPERM isn't mapped in so chown returns an unknown error. This is a
regression from 0.4.12.

philips:node/ (master*) $ cat chown.js
var fs = require('fs')
fs.chown("/tmp/foobar", 100, 100, function(er){ console.log(er);})

philips:node/ (master*) $ ls -la /tmp/foobar
total 0
drwxr-xr-x   2 root  wheel   68 Jan 24 17:21 .

0.4
---

philips:node/ (master*) $ /usr/local/Cellar/node/0.4.12/bin/node chown.js
{ stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'EPERM, Operation not permitted \'/tmp/foobar\'',
  errno: 1,
  code: 'EPERM',
  path: '/tmp/foobar' }

master
------

philips:node/ (master*) $ ./node chown.js
{ [Error: UNKNOWN, unknown error '/tmp/foobar'] errno: -1, code: 'UNKNOWN', path: '/tmp/foobar' }

AFTER
-----

philips:node/ (master*) $ ./node chown.js
{ [Error: EPERM, operation not permitted '/tmp/foobar'] errno: 49, code: 'EPERM', path: '/tmp/foobar' }
2012-01-31 16:37:26 -08:00