Skip to content

CLOEXEC does not work on Alpine #872

Closed

Description

In the VS Code repo, when I bump node-pty, the Alpine build reports the following error

2026-01-13T21:31:14.7685867Z npm error ../src/unix/pty.cc: In function 'void pty_close_inherited_fds()':
2026-01-13T21:31:14.7686207Z npm error ../src/unix/pty.cc:135:40: error: 'CLOSE_RANGE_CLOEXEC' was not declared in this scope
2026-01-13T21:31:14.7686533Z npm error   135 |   if (syscall(SYS_close_range, 3, ~0U, CLOSE_RANGE_CLOEXEC) == 0) {
2026-01-13T21:31:14.7686816Z npm error       |                                        ^~~~~~~~~~~~~~~~~~~
2026-01-13T21:31:14.7687112Z npm error make: *** [pty.target.mk:115: Release/obj.target/pty/src/unix/pty.o] Error 1
2026-01-13T21:31:14.7687392Z npm error gyp ERR! build error 
2026-01-13T21:31:14.7687660Z npm error gyp ERR! stack Error: `make` failed with exit code: 2

Look in pty.cc and see whether we have to use a different constant or implementation for Alpine.

Activity

  1. rzhao271 commented on Feb 25, 2026

    @rzhao271
    CollaboratorAuthor

    Verified by the fact that the VS Code build is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions