Skip to content

Socket activation on macOS #7241

@andre4ik3

Description

@andre4ik3

Issue Details

Caddy got support for socket activation on Linux in #6573 (issue #6296). Would it also be possible to add support for socket activation on macOS?

This would require calling the C function launch_activate_socket with the name parameter set to the name of the socket entry in the daemon plist file. In return it would give a list of file descriptors, which it should be possible to use with the existing support for socket activation?

It would also be nice to support EnableTransactions by calling xpc_transaction_begin when a HTTP request starts and xpc_transaction_end when it finishes. That way launchd is aware of when the service is idle or not, and can safely terminate it when it's idle for a long time to not waste resources.

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No response

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