Unifying boilerplate code for handling child processes.#7991
Closed
alexey-tikhonov wants to merge 38 commits intoSSSD:masterfrom
Closed
Unifying boilerplate code for handling child processes.#7991alexey-tikhonov wants to merge 38 commits intoSSSD:masterfrom
alexey-tikhonov wants to merge 38 commits intoSSSD:masterfrom
Conversation
d1c7586 to
9b0a4d0
Compare
4fbfac7 to
627139c
Compare
4822823 to
c2ef433
Compare
818d604 to
c29d417
Compare
c29d417 to
00b4ad4
Compare
…y()` kind of "private". 'ipa_subdomains_server.c' still uses those, but ideally should be reworked to use `sss_child_start()` instead.
Issue spotted by 'o3' LLM: ``` sss_child_start builds a pipe pair, marks non-blocking using sss_fd_nonblocking but no error check of that helper. ```
Issue spotted by 'o3' LLM: ``` buf is allocated exactly PASSKEY_CHILD_MSG_CHUNK bytes; if the child writes a full 1024-byte, the string may miss a terminating NUL (read does not append one). Previously had the same flaw, but still worth fixing (allocate +1 or ensure NUL). ```
as it suits better.
67bbe31 to
e34f8a9
Compare
sumit-bose
reviewed
Jul 9, 2025
accidentally if 'io' isn't required.
sumit-bose
approved these changes
Jul 9, 2025
Contributor
sumit-bose
left a comment
There was a problem hiding this comment.
Hi,
thank you very much for this long overdue effort. Codewise I'm fine and I run a couple of test with different child processes without issues. Some of them I run many times and checked for memory leaks without success. ACK.
bye,
Sumit
Member
Author
|
Pushed PR: #7991
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A set of patches with the main goal of getting rid of tons of code duplication around
fork() + exec(), setting up SIGCHLD and timeout handlers, etc.There are two (clearly marked) patches generated by LLM under strict supervision (multiple iterations for both patches) and two patches written as a result of review by LLM (also clearly marked).
There is further potential for improvements, most notably replacing direct
exec*()inipa_subdomains_server.candproxy_auth.c, but also unifying some typical callbacks (like timeout handler that usually simply ends tevent req). But this is already pretty large and I'd like to have it reviewed.