Skip to content

feat: add --socket-fd CLI option - #7940

Open
runleveldev wants to merge 1 commit into
coder:mainfrom
runleveldev:feat/socket-activation
Open

feat: add --socket-fd CLI option#7940
runleveldev wants to merge 1 commit into
coder:mainfrom
runleveldev:feat/socket-activation

Conversation

@runleveldev

Copy link
Copy Markdown

Fixes #7939

@runleveldev
runleveldev requested a review from a team as a code owner August 10, 2026 19:54
@runleveldev
runleveldev force-pushed the feat/socket-activation branch from 4af67c5 to 81072fc Compare August 10, 2026 19:54

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool thank you!

@code-asher code-asher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, had one thought. Would it make sense to combine the flags? They seem so similar apart from the unlink behavior.

What do you think about reusing --socket, but if it is a number (parseInt() returns non-NaN) then we assume it is an fd, and we skip the unlink and mode change? Or does that overcomplicate the flag without any real benefit?

Do you know of any precedent from other existing applications?

@runleveldev

Copy link
Copy Markdown
Author

Actually, had one thought. Would it make sense to combine the flags? They seem so similar apart from the unlink behavior.

What do you think about reusing --socket, but if it is a number (parseInt() returns non-NaN) then we assume it is an fd, and we skip the unlink and mode change? Or does that overcomplicate the flag without any real benefit?

Do you know of any precedent from other existing applications?

I was originally referencing dockerd but it uses a single "host" flag with schemes i.e. tcp://127.0.0.1:1234, unix:///path/to/sock, or fd://3. Obviously that would have been a more-jarring rewrite here. I did toy with combining this with the existing socket option, but I prefer to keep them explicit to avoid shadowing unlikely, but technically valid, paths (like 3 which currently would make a socket file in $PWD/3).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support socket fd inheritance for systemd socket activation

2 participants