!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1179 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org194 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
22 Dec 2025
@reckenrode:matrix.orgRandy Eckenrode * What are the expected semantics when the user provides NULL fds and nfds 0? 15:47:57
@reckenrode:matrix.orgRandy EckenrodeIs it equivalent to passing an empty array?15:48:53
@reckenrode:matrix.orgRandy Eckenrode macOS supports pselect but not ppoll? 15:51:13
@reckenrode:matrix.orgRandy Eckenrode Let’s look at the implementation. The signature takes a pointer, so NULL should be valid. 15:52:54
@ihar.hrachyshka:matrix.orgIhar Hrachyshkaone could probably implement g_poll conditioning to default to poll but fall back to select if a) any device fds passed or b) fds is null. then for most calls we would use poll.15:53:06
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

that's on nixos

(ins)[nix-shell:/tmp]$ ./a.out
poll() returned: 0

(ins)[nix-shell:/tmp]$ cat test.c
#include <stdio.h>
#include <poll.h>
#include <errno.h>
#include <string.h>

int main() {
    int result = poll(NULL, 0, 1000);

    printf("poll() returned: %d\n", result);

    if (result == -1) {
        printf("Error: %s\n", strerror(errno));
    }

    return 0;
}


(ins)[nix-shell:/tmp]$ clang ./test.c

(ins)[nix-shell:/tmp]$ ./a.out
poll() returned: 0
15:53:15
@ihar.hrachyshka:matrix.orgIhar Hrachyshkaactuall it returns the same zero on darwin, not sure if there's more than just that they are looking for...15:54:09
@ihar.hrachyshka:matrix.orgIhar Hrachyshkamaybe the original reasoning documented in the comment is no longer applicable, but tap device polling is still an issue.15:55:30

Show newer messages


Back to Room ListRoom Version: 6