Skip to content

Support Unix domain datagram sockets #61933

@pauldraper

Description

@pauldraper

What is the problem this feature will solve?

  1. Notifying SystemD of service status, via$NOTIFY_SOCKET
  2. Logging to Syslog, via /dev/log

Unix datagram sockets are the only way to accomplish these very basic service tasks on UNIX-like systems, without extra configuration or leaving Node.js. (See workarounds below.) Node.js could be a good runtime for Unix services, if it did not lack the basic features.

What is the feature you are proposing to solve the problem?

Support Unix datagram sockets.

Node.js supported this feature prior to 0.5. It was removed because it couldn't be sensibly supported on one operating system, Windows (#29339). Node.js does support several features that are missing or significantly different on Windows...POSIX signals, POSIX file permissions, fs.watch() event types.

What alternatives have you considered?

  1. Changing to C, C++, Java, Python, Go, Ruby, Deno, or any major language/runtime -- they all support AF_UNIX SOCK_DGRAM.
  2. Add dependencies on external executables.
  3. Compile a Node.js native module (e.g. unix-dgram).

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions