createUnixSocket function

int createUnixSocket(
  1. String path
)

Creates a Unix domain socket with the specified path.

This function creates a Unix domain socket with the given path. The socket is created with the SOCK_CLOEXEC flag set, which ensures the socket is closed when the process executes a new program.

Parameters:

  • path: The path of the Unix domain socket to create.

Returns: The file descriptor of the created Unix domain socket.

Throws:

  • Exception: If an error occurs while creating the Unix domain socket.

Implementation

int createUnixSocket(String path) => _implementation.createUnixSocket(path);