History log of /libuv/src/unix/darwin.c (Results 26 – 50 of 76)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v1.2.1, v1.2.0, v0.10.32
# 885b1ecd 02-Jan-2015 Ben Noordhuis

darwin: fix uv_exepath(smallbuf) UV_EPERM error

Passing a buffer that was too small to hold the result made it fail
with UV_EPERM because the -1 status code from _NSGetExecutablePath()

darwin: fix uv_exepath(smallbuf) UV_EPERM error

Passing a buffer that was too small to hold the result made it fail
with UV_EPERM because the -1 status code from _NSGetExecutablePath()
was returned unmodified to the caller.

This commit rewrites uv_exepath() to:

1. Not allocate heap memory, and

2. Not clobber the result buffer on error, and

3. Handle _NSGetExecutablePath()'s and realpath()'s idiosyncracies, and

4. Store as much of the path in the output buffer as possible, don't
fail with an error. Makes it behave the same as other platforms.
The result is always zero-terminated.

Fixes: https://github.com/libuv/libuv/issues/103
PR-URL: https://github.com/libuv/libuv/pull/104
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# afb31921 02-Jan-2015 Ben Noordhuis

unix: make uv_exepath(size=0) return UV_EINVAL

Make the behavior of a call to uv_exepath() with a size argument of zero
consistent with the Windows implementation where it returns UV_EIN

unix: make uv_exepath(size=0) return UV_EINVAL

Make the behavior of a call to uv_exepath() with a size argument of zero
consistent with the Windows implementation where it returns UV_EINVAL.

PR-URL: https://github.com/libuv/libuv/pull/104
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.1.0, v0.10.31, v1.0.2, v0.10.30, v1.0.1, v1.0.0, v0.10.29, v1.0.0-rc2, v1.0.0-rc1, v0.11.29, v0.11.28, v0.11.27, v0.10.28, v0.11.26
# 570caf04 25-Jun-2014 Saúl Ibarra Corretgé

Merge branch 'v0.10'

Conflicts:
ChangeLog
build.mk
src/unix/darwin.c
src/unix/getaddrinfo.c
src/version.c
test/test-li

Merge branch 'v0.10'

Conflicts:
ChangeLog
build.mk
src/unix/darwin.c
src/unix/getaddrinfo.c
src/version.c
test/test-list.h

show more ...


# 211bf4ec 19-Jun-2014 Fedor Indutny

darwin: invoke `mach_timebase_info` only once

According to @aktau, the call to `mach_timebase_info` costs 90% of the
total execution time of `uv_hrtime()`. The result of the call is stat

darwin: invoke `mach_timebase_info` only once

According to @aktau, the call to `mach_timebase_info` costs 90% of the
total execution time of `uv_hrtime()`. The result of the call is static
on all existing platforms, so there is no need in invoking it multiple
times.

Signed-off-by: Fedor Indutny <fedor@indutny.com>

show more ...

Revision tags: v0.10.27, v0.11.25, v0.11.24, v0.11.23, v0.10.26, v0.11.22, v0.11.21, v0.11.20, v0.10.25, v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21, v0.11.16, v0.10.20
# 646de34f 06-Dec-2013 Fedor Indutny

unix: fix various memory leaks and undef behavior

Kindly suggested by `cppcheck`.

Revision tags: v0.11.15
# 17711b90 13-Nov-2013 Ben Noordhuis

Merge remote-tracking branch 'origin/v0.10'

Conflicts:
AUTHORS
ChangeLog
src/unix/darwin.c
src/version.c


# 026241ca 13-Nov-2013 Ben Noordhuis

unix: unbreak bsd build after bbccafb

Unbreak the build on the BSDs after commit bbccafb. Move the new
uv__platform_invalidate_fd() function from src/unix/darwin.c to
src/unix/kqueu

unix: unbreak bsd build after bbccafb

Unbreak the build on the BSDs after commit bbccafb. Move the new
uv__platform_invalidate_fd() function from src/unix/darwin.c to
src/unix/kqueue.c.

show more ...

Revision tags: v0.10.19
# 6149b66c 12-Nov-2013 Fedor Indutny

Merge branch 'v0.10'

Conflicts:
build.mk
src/unix/core.c
src/unix/darwin.c


Revision tags: v0.11.14
# bbccafbe 25-Oct-2013 Fedor Indutny

unix: fix reopened fd bug

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 watch

unix: fix reopened fd bug

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

show more ...

# 21c37a7d 30-Oct-2013 Ben Noordhuis

linux: use CLOCK_MONOTONIC_COARSE if available

On some systems, clock_gettime(CLOCK_MONOTONIC) is only serviced from
the vDSO when the __vdso_clock_gettime() wrapper is confident enough

linux: use CLOCK_MONOTONIC_COARSE if available

On some systems, clock_gettime(CLOCK_MONOTONIC) is only serviced from
the vDSO when the __vdso_clock_gettime() wrapper is confident enough
that the vDSO timestamp is highly accurate. When in doubt, it falls
back to making a traditional SYS_clock_gettime system call with all
the overhead that entails.

While a commendable approach, it's overkill for our purposes because we
don't usually need high precision time. That's why this commit switches
to CLOCK_MONOTONIC_COARSE for low-precision timekeeping, provided said
clock has at least a one millisecond resolution.

This change should eliminate the system call on almost all systems,
including virtualized ones, provided the kernel is >= 2.6.32 and glibc
is new enough to find and parse the vDSO.

show more ...

Revision tags: v0.10.18
# 38df93cf 05-Oct-2013 Ben Noordhuis

unix: revert recent FSEvent changes

This commit reverts the following commits:

983fa68 darwin: fix 10.6 build error in fsevents.c
684e212 fsevents: use shared FSEventStr

unix: revert recent FSEvent changes

This commit reverts the following commits:

983fa68 darwin: fix 10.6 build error in fsevents.c
684e212 fsevents: use shared FSEventStream
ea4cb77 fsevents: FSEvents is most likely not thread-safe
9bae606 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.

show more ...

Revision tags: v0.10.17, v0.10.16, v0.11.13, v0.11.12, v0.11.11, v0.11.10, v0.10.15, v0.11.9, v0.10.14, v0.11.8
# 684e2124 20-Aug-2013 Fedor Indutny

fsevents: use shared FSEventStream

It seems that number of simultaneously opened FSEventStreams is
limited on OSX (i.e. you can have only fixed number of them on
one running system),

fsevents: use shared FSEventStream

It seems that number of simultaneously opened FSEventStreams is
limited on OSX (i.e. you can have only fixed number of them on
one running system), getting past through this limit will cause
`FSEventStreamCreate` to return false and write following message
to stderr:

(CarbonCore.framework) FSEventStreamStart: register_with_server:
ERROR: f2d_register_rpc() => (null) (-21)

To prevent this, we must use only one shared FSEventStream with a
paths for all uv_fsevent_t handles, and then filter out events for
each handle using this paths again.

See https://github.com/joyent/node/issues/5463

Conflicts:
include/uv-private/uv-darwin.h
src/unix/fsevents.c

show more ...

# 9bae606d 13-Aug-2013 Ben Noordhuis

darwin: create fsevents thread on demand

* Move CF run loop code to fsevents.c.

* Create the fsevents thread on demand rather than at startup.

* Remove use of ACCESS_ONCE.

darwin: create fsevents thread on demand

* Move CF run loop code to fsevents.c.

* Create the fsevents thread on demand rather than at startup.

* Remove use of ACCESS_ONCE. All accesses to loop->cf_loop are
protected by full memory barriers so no reordering can take place.

Fixes #872.

Conflicts:
src/unix/darwin.c

show more ...

# cd2794c0 20-Aug-2013 Fedor Indutny

fsevents: use shared FSEventStream

It seems that number of simultaneously opened FSEventStreams is
limited on OSX (i.e. you can have only fixed number of them on
one running system),

fsevents: use shared FSEventStream

It seems that number of simultaneously opened FSEventStreams is
limited on OSX (i.e. you can have only fixed number of them on
one running system), getting past through this limit will cause
`FSEventStreamCreate` to return false and write following message
to stderr:

(CarbonCore.framework) FSEventStreamStart: register_with_server:
ERROR: f2d_register_rpc() => (null) (-21)

To prevent this, we must use only one shared FSEventStream with a
paths for all uv_fsevent_t handles, and then filter out events for
each handle using this paths again.

See https://github.com/joyent/node/issues/5463

show more ...

# 06c4fa67 13-Aug-2013 Ben Noordhuis

darwin: create fsevents thread on demand

* Move CF run loop code to fsevents.c.

* Create the fsevents thread on demand rather than at startup.

* Remove use of ACCESS_ONCE.

darwin: create fsevents thread on demand

* Move CF run loop code to fsevents.c.

* Create the fsevents thread on demand rather than at startup.

* Remove use of ACCESS_ONCE. All accesses to loop->cf_loop are
protected by full memory barriers so no reordering can take place.

Fixes #872.

show more ...

# ffcf5d1a 13-Aug-2013 Ben Noordhuis

darwin: fix indentation in uv__hrtime()

Revision tags: v0.11.7, v0.10.13
# e3a657c6 20-Jul-2013 Brian White

unix, windows: add MAC to uv_interface_addresses()

Make uv_interface_addresses() return the MAC address as a 48 bits
binary value in the phys_addr field of the uv_interface_address_t

unix, windows: add MAC to uv_interface_addresses()

Make uv_interface_addresses() return the MAC address as a 48 bits
binary value in the phys_addr field of the uv_interface_address_t
struct.

show more ...

Revision tags: v0.11.6, v0.10.12, v0.11.5, v0.10.11
# 3ee4d3f1 06-Jun-2013 Ben Noordhuis

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like this one:

if (uv_foo(loop) < 0) {
uv_err_t err = uv_last_error(loop);
fprintf(stderr, "%s\n", uv_strerror(err));
}

Should be rewritten like this:

int err = uv_foo(loop);
if (err < 0)
fprintf(stderr, "%s\n", uv_strerror(err));

The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.

show more ...

Revision tags: v0.10.10, v0.11.4
# 8ef9592a 29-May-2013 Ben Noordhuis

Merge remote-tracking branch 'origin/v0.10'

Conflicts:
ChangeLog
src/unix/stream.c
src/version.c


Revision tags: v0.10.9, v0.10.8
# a1cb52a3 20-May-2013 Ben Noordhuis

darwin: task_info() cannot fail

And if it does: assert, don't return errno. It's a mach function, it
doesn't set errno.

# e515d715 17-May-2013 Ben Noordhuis

darwin: make two uv__cf_*() functions static

# 7dbb974f 18-May-2013 Bert Belder

Merge branch 'v0.10'

Conflicts:
src/unix/darwin.c


# d5fa633e 17-May-2013 Fedor Indutny

darwin: assume CFRunLoopStop() isn't thread-safe

Use signaling mechanism for loop termination, because CFRunLoopStop() is
most likely not a thread-safe function and invoking it from othe

darwin: assume CFRunLoopStop() isn't thread-safe

Use signaling mechanism for loop termination, because CFRunLoopStop() is
most likely not a thread-safe function and invoking it from other thread
may sometimes result in a "dead-lock".

fix #799

show more ...

Revision tags: v0.11.3, v0.10.7, v0.10.6, v0.11.2, v0.10.5, v0.10.4, v0.11.1
# 8041c52f 10-Apr-2013 Ben Noordhuis

unix: style fixups

Revision tags: node-v0.11.0, v0.10.2, node-v0.7.3, node-v0.7.7, node-v0.7.5, node-v0.5.3, node-v0.10.1, node-v0.10.0, node-v0.9.12, node-v0.9.11, node-v0.8.21
# 14aa6153 09-Feb-2013 Ben Kelly

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 a

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.

show more ...

1234