Skip to content

Treat fd=0 as a valid file descriptor with reload/workers#2927

Merged
Kludex merged 3 commits intoKludex:mainfrom
eltoder:feature/one-worker
Apr 30, 2026
Merged

Treat fd=0 as a valid file descriptor with reload/workers#2927
Kludex merged 3 commits intoKludex:mainfrom
eltoder:feature/one-worker

Conversation

@eltoder
Copy link
Copy Markdown
Contributor

@eltoder eltoder commented Apr 30, 2026

Summary

Passing a socket as stdin (--fd=0) currently does not work in modes that use subprocesses (i.e. with --reload and --workers), because config.fd is checked for truthiness instead of for None.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 30, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing eltoder:feature/one-worker (952678e) with main (6761b2c)

Open in CodSpeed

@eltoder eltoder force-pushed the feature/one-worker branch from 07f4536 to 16fd694 Compare April 30, 2026 02:29
eltoder added 2 commits April 30, 2026 11:24
Also, check uds for None for consistency with Server.startup().
@eltoder eltoder force-pushed the feature/one-worker branch from 5592283 to 7ddfab6 Compare April 30, 2026 15:25
@Kludex Kludex changed the title Fix --fd=0 with reload/workers Treat fd=0 as a valid file descriptor with reload/workers Apr 30, 2026
@Kludex Kludex merged commit ad5ff87 into Kludex:main Apr 30, 2026
24 checks passed
@Kludex
Copy link
Copy Markdown
Owner

Kludex commented Apr 30, 2026

Thanks!

@eltoder eltoder deleted the feature/one-worker branch April 30, 2026 18:26
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.

2 participants