Skip to content

node-syscall doesn't support struct-pointer arguments #993

@nevkontakte

Description

@nevkontakte

I ran into this issue today while debugging testing package under Go 1.16.

The Fstatat() function in https://pkg.go.dev/internal/syscall/unix#Fstatat package passes a pointer to struct stat as a third argument. Unfortunately, our node-syscall module doesn't seem to support passing structs into syscalls, only arrays or integers. I don't know if there is an easy fix, or how many syscalls like that there is, so I'm filing this issue primarily for reference purposes.

If we were to implement this, we need to be able to convert a Go struct baked by a JS object into a binary representation, pass that into the syscall, and then unpack it again. I am not sure if we currently have all necessary information at runtime to achieve that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions