History log of /libuv/src/unix/sunos.c (Results 1 – 25 of 100)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 1b01b786 24-May-2023 Ben Noordhuis

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings

unix,win: replace QUEUE with struct uv__queue (#4022)

Recent versions of gcc have started emitting warnings about the liberal
type casting inside the QUEUE macros. Although the warnings are false
positives, let's use them as the impetus to switch to a type-safer and
arguably cleaner approach.

Fixes: https://github.com/libuv/libuv/issues/4019

show more ...


# 988d225c 24-Nov-2022 Tim Besard

unix,win: add uv_get_available_memory() (#3754)


# e1415860 11-Nov-2022 Trevor Norris

src: add new metrics APIs (#3749)

The following metrics are now always recorded and available via the new
uv_metrics_info() API.

* loop_count: Number of event loop iterations.

src: add new metrics APIs (#3749)

The following metrics are now always recorded and available via the new
uv_metrics_info() API.

* loop_count: Number of event loop iterations.
* events: Total number of events processed by the event handler.
* events_waiting: Total number of events waiting in the event queue when
the event provider request was made.

Benchmarking has shown no noticeable impact recording these metrics.

PR-URL: https://github.com/libuv/libuv/pull/3749

show more ...


# 612c28b8 11-Apr-2022 Andy Fiddaman

sunos: fs-event callback can be called after uv_close() (#3542)

On illumos and Solaris, fs events are implemented with
PORT_SOURCE_FILE type event ports. These are one-shot so
need r

sunos: fs-event callback can be called after uv_close() (#3542)

On illumos and Solaris, fs events are implemented with
PORT_SOURCE_FILE type event ports. These are one-shot so
need re-arming each time they fire. Once they are armed
and an event occurs, the kernel removes them from the current
cache list and puts them on an event queue to be read by
the application.

There's a window in closing one of these ports when it could
have triggered and be pending delivery. In that case, the
attempt to disarm (dissociate) the event will fail with ENOENT
but libuv still goes ahead and closes down the handle. In
particular, the close callback (uv_close() argument) will be
called but then the event will subsequently be delivered if
the loop is still active; this should not happen.

show more ...


# 5fe59726 20-Jul-2021 Andy Fiddaman

sunos: restore use of event ports

The sunos platform currently covers at least the Solaris and illumos
operating systems. Although these diverged 11 years ago they still share
some c

sunos: restore use of event ports

The sunos platform currently covers at least the Solaris and illumos
operating systems. Although these diverged 11 years ago they still share
some common features such as support for event ports.

illumos also has a compatibility wrapper for epoll but this is not
recommended for use over event ports. From the NOTES section of
https://illumos.org/man/5/epoll:

The epoll facility is implemented for purposes of offering
compatibility to and portability of Linux-borne
applications; native applications should continue to prefer
using event ports... In particular, use of epoll in a
multithreaded environment is fraught with peril...

Restore the event ports code so that libuv can continue to be used
on Solaris, and to avoid the problems that come with using epoll()
on illumos. The separation of epoll into src/unix/epoll.c has been
retained.

Fixes: https://github.com/libuv/libuv/issues/3241
PR-URL: https://github.com/libuv/libuv/pull/3242
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# 8ea8f124 19-Jul-2021 Claes Nästén

unix: strnlen is not available on Solaris 10

`strnlen` was not available on Solaris 10, so provide a fallback
implementation for it.

PR-URL: https://github.com/libuv/libuv/pull/

unix: strnlen is not available on Solaris 10

`strnlen` was not available on Solaris 10, so provide a fallback
implementation for it.

PR-URL: https://github.com/libuv/libuv/pull/3152
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


# caf22ddb 02-Jul-2021 tjarlama

illumos: event ports to epoll

Sunos has added epoll wrappers to offer compatability for binaries
build specifically for linux (https://illumos.org/man/5/epoll). With
this, it's now p

illumos: event ports to epoll

Sunos has added epoll wrappers to offer compatability for binaries
build specifically for linux (https://illumos.org/man/5/epoll). With
this, it's now possible to develop epoll as a generic interface and
share between Linux and SUNOS, similar to kqueue.

Fixes: https://github.com/libuv/libuv/issues/3008
PR-URL: https://github.com/libuv/libuv/pull/3046
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...


Revision tags: v1.41.0, v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0
# e8effd45 26-Mar-2020 Trevor Norris

core: add API to measure event loop idle time

The API addition `uv_metrics_idle_time()` is a thread safe call that
allows the user to retrieve the amount of time the event loop has spent

core: add API to measure event loop idle time

The API addition `uv_metrics_idle_time()` is a thread safe call that
allows the user to retrieve the amount of time the event loop has spent
in the kernel's event provider (i.e. poll). It was done this way to
allow retrieving this value without needing to interrupt the execution
of the event loop. This option can be enabled by passing
`UV_METRICS_IDLE_TIME` to `uv_loop_configure()`.

One important aspect of this change is, when enabled, to always first
call the event provider with a `timeout == 0`. This allows libuv to know
whether any events were waiting in the event queue when the event
provider was called. The importance of this is because libuv is tracking
the amount of "idle time", not "poll time". Thus the provider entry time
is not recorded when `timeout == 0` (the event provider never idles in
this case).

While this does add a small amount of overhead, when enabled, but the
overhead decreases when the event loop has a heavier load. This is
because poll events will be waiting when the event provider is called.
Thus never actually recording the provider entry time.

Checking if `uv_loop_t` is configured with `UV_METRICS_IDLE_TIME` always
happens in `uv__metrics_set_provider_entry_time()` and
`uv__metrics_update_idle_time()`. Making the conditional logic wrapping
each call simpler and allows for instrumentation to always hook into
those two function calls.

Rather than placing the fields directly on `uv__loop_internal_fields_t`
add the struct `uv__loop_metrics_t` as a location for future metrics API
additions.

Tests and additional documentation has been included.

PR-URL: https://github.com/libuv/libuv/pull/2725
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...


Revision tags: v1.35.0, v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0
# 040543ee 17-Aug-2019 Santiago Gimeno

src: move uv_free_cpu_info to uv-common.c

PR-URL: https://github.com/libuv/libuv/pull/2433
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.co

src: move uv_free_cpu_info to uv-common.c

PR-URL: https://github.com/libuv/libuv/pull/2433
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0
# c4e9657d 01-May-2019 Kelvin Jin

unix,win: add uv_get_constrained_memory()

Fixes: https://github.com/libuv/libuv/issues/2286
PR-URL: https://github.com/libuv/libuv/pull/2289
Reviewed-By: Ben Noordhuis <info@bnoordhu

unix,win: add uv_get_constrained_memory()

Fixes: https://github.com/libuv/libuv/issues/2286
PR-URL: https://github.com/libuv/libuv/pull/2289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.28.0, v1.27.0
# 450b93aa 21-Feb-2019 Andrew Paprocki

sunos: add perror() output prior to abort()

There are three `abort()` calls within the I/O subsystem related to
Solaris ports (`port_associate()`, `port_dissociate()`, and
`port_getn

sunos: add perror() output prior to abort()

There are three `abort()` calls within the I/O subsystem related to
Solaris ports (`port_associate()`, `port_dissociate()`, and
`port_getn()`). To simplify debugging issues where the kernel is
setting `errno` and returning failure, call `perror()` to see the
`errno` value cause of the failure.

PR-URL: https://github.com/libuv/libuv/pull/2200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.26.0
# 1ce6393a 10-Feb-2019 Ben Noordhuis

unix: don't attempt to invalidate invalid fd

Add a missing check in uv__io_close() where it called
uv__platform_invalidate_fd() without checking that the
watcher actually has a valid

unix: don't attempt to invalidate invalid fd

Add a missing check in uv__io_close() where it called
uv__platform_invalidate_fd() without checking that the
watcher actually has a valid file descriptor assigned.

Fixes: https://github.com/libuv/libuv/issues/2181
PR-URL: https://github.com/libuv/libuv/pull/2182
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.25.0, v1.24.1, v1.24.0
# c5593b51 05-Nov-2018 Jameson Nash

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>

show more ...

# 5fb95172 15-Oct-2018 cjihrig

unix,win: make uv_interface_addresses() consistent

This commit does a few things to make the function more
consistent across platforms:

- Initialize the output parameters before

unix,win: make uv_interface_addresses() consistent

This commit does a few things to make the function more
consistent across platforms:

- Initialize the output parameters before everything else.
- Return early if there are no interfaces instead of performing
zero-sized allocations.
- Add a missing memory deallocation.

Refs: https://github.com/libuv/libuv/pull/2035
PR-URL: https://github.com/libuv/libuv/pull/2039
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>

show more ...

Revision tags: v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1
# 89cbbc89 19-Jan-2018 Mason X

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno'

include,src: introduce UV__ERR() macro

Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

Revision tags: v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0
# 8ea2ee4e 02-Oct-2017 Sakthipriyan Vairamani (thefourtheye)

unix: remove unused variables

PR-URL: https://github.com/libuv/libuv/pull/1578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com

unix: remove unused variables

PR-URL: https://github.com/libuv/libuv/pull/1578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

Revision tags: v1.14.1, v1.14.0, v1.13.1, v1.13.0
# 26daa99e 26-Jun-2017 Sebastian Wiedenroth

sunos: filter out non-IPv4/IPv6 interfaces

Filter out anything that is not an IPv4 or IPv6 interface in
uv_interface_addresses().

PR-URL: https://github.com/libuv/libuv/pull/138

sunos: filter out non-IPv4/IPv6 interfaces

Filter out anything that is not an IPv4 or IPv6 interface in
uv_interface_addresses().

PR-URL: https://github.com/libuv/libuv/pull/1387
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

Revision tags: v1.12.0
# 470b0258 21-Feb-2017 Brad King

unix: factor out reusable no-proctitle impl

On SunOS we implement no support for proctitle. Other platforms may not
support proctitle either, so provide a dedicated source file to use i

unix: factor out reusable no-proctitle impl

On SunOS we implement no support for proctitle. Other platforms may not
support proctitle either, so provide a dedicated source file to use in
this case.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

# 463800ff 17-Mar-2017 cjihrig

win,sunos: stop handle on uv_fs_event_start() err

This commit stops the handle in uv_fs_event_start() when an
error occurs.

Fixes: https://github.com/libuv/libuv/issues/1253

win,sunos: stop handle on uv_fs_event_start() err

This commit stops the handle in uv_fs_event_start() when an
error occurs.

Fixes: https://github.com/libuv/libuv/issues/1253
PR-URL: https://github.com/libuv/libuv/pull/1257
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>

show more ...

Revision tags: v1.11.0, v1.10.2, v1.10.1, v1.10.0, v0.10.37, v1.9.1
# fd7ce57f 22-Apr-2016 Jason Madden

unix: make loops and watchers usable after fork()

Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_f

unix: make loops and watchers usable after fork()

Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_fork
function for each supported platform, similar to the way
uv__platform_loop_init works.

After this call, existing and new IO, async and signal watchers will
contiue working as before on all platforms, as will the
threadpool (although any threads it was using are of course gone).

On Linux and BSDs that use kqueue, existing and new fsevent watchers
will also continue to work as expected. On OS X, though, directory
fsevents will not be able to use the optimized CoreFoundation path if
they had already been used in the parent process, instead falling back
to the kqueue path used on other BSDs.

Existing fsevent watchers will not function on AIX or SunOS. This
could be relatively easily fixed by someone with AIX knowledge in the
future, but SunOS will require some additional work to keep track if
the watchers.

A new test file, test/test-fork.c, was added to contain fork-related
tests to verify functionality in the child process.

PR-URL: https://github.com/libuv/libuv/pull/846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 0f84c305 18-Feb-2017 Brad King

unix: factor out getifaddrs result filter

On platforms using getifaddrs we iterate over the interfaces two or
three times. First we count them, then we enumerate them, and then we
f

unix: factor out getifaddrs result filter

On platforms using getifaddrs we iterate over the interfaces two or
three times. First we count them, then we enumerate them, and then we
fill in physical addresses. Each loop needs to do the same filtering,
so factor out the exclusion test into a helper function for each
platform.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 80c4cf6b 18-Feb-2017 Brad King

unix: filter getifaddrs results consistently

We loop over getifaddrs results multiple times. Fix the filter
conditions to be consistent for all passes.

PR-URL: https://github.c

unix: filter getifaddrs results consistently

We loop over getifaddrs results multiple times. Fix the filter
conditions to be consistent for all passes.

PR-URL: https://github.com/libuv/libuv/pull/1240
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 36ba7eb6 01-Dec-2016 Ben Noordhuis

sunos: fix SUNOS_NO_IFADDRS build

Don't compile uv__set_phys_addr() if SUNOS_NO_IFADDRS is defined,
it has been reported to break the build on Solaris 10.

Bug introduced in comm

sunos: fix SUNOS_NO_IFADDRS build

Don't compile uv__set_phys_addr() if SUNOS_NO_IFADDRS is defined,
it has been reported to break the build on Solaris 10.

Bug introduced in commit d75e334 ("sunos: set phys_addr of
interface_address using ARP") from last June.

Fixes: https://github.com/nodejs/node/issues/9856
PR-URL: https://github.com/libuv/libuv/pull/1155
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 840a8c59 27-Jun-2016 cjihrig

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too

unix,win: make uv_get_process_title() stricter

This commit causes uv_get_process_title() to:
- return EINVAL if the buffer is null or size is 0
- return ENOBUFS if the title is too big for the buffer
- null terminate the buffer on success

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

show more ...

# d75e334e 10-Jun-2016 Brian Maher

sunos: set phys_addr of interface_address using ARP

If getifaddrs() returns an all zero ifa_addr field, then use ARP to
set the phys_addr field of the uv_interface_address_t on the sunos

sunos: set phys_addr of interface_address using ARP

If getifaddrs() returns an all zero ifa_addr field, then use ARP to
set the phys_addr field of the uv_interface_address_t on the sunos
platform.

PR-URL: https://github.com/libuv/libuv/pull/907
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

1234