Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/src/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,14 @@ API

.. versionadded:: 1.25.0

.. c:function:: int uv_os_is_app_container(void)

Returns `1` when the current process runs inside a Windows AppContainer
(that is, with a lowbox token), `0` otherwise. Always returns `0` on
platforms other than Windows.

.. versionadded:: 1.52.0

.. c:function:: int uv_gettimeofday(uv_timeval64_t* tv)

Cross-platform implementation of :man:`gettimeofday(2)`. The timezone
Expand Down
2 changes: 2 additions & 0 deletions include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,8 @@ UV_EXTERN int uv_os_gethostname(char* buffer, size_t* size);

UV_EXTERN int uv_os_uname(uv_utsname_t* buffer);

UV_EXTERN int uv_os_is_app_container(void);

struct uv_metrics_s {
uint64_t loop_count;
uint64_t events;
Expand Down
5 changes: 5 additions & 0 deletions src/unix/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,11 @@ int uv_os_uname(uv_utsname_t* buffer) {
return r;
}

int uv_os_is_app_container(void) {
/* AppContainers are a Windows concept. */
return 0;
}

int uv__getsockpeername(const uv_handle_t* handle,
uv__peersockfunc func,
struct sockaddr* name,
Expand Down
Loading