Skip to content

pass container state to hooks over stdin and do some rafctoring#144

Merged
ComixHe merged 3 commits into
OpenAtom-Linyaps:masterfrom
ComixHe:master
Apr 10, 2026
Merged

pass container state to hooks over stdin and do some rafctoring#144
ComixHe merged 3 commits into
OpenAtom-Linyaps:masterfrom
ComixHe:master

Conversation

@ComixHe

@ComixHe ComixHe commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

- Add new socket class with socketAddress for generic socket operations
- Rename unixSocketClient to unix_socket
- Change unix_socket from inheritance to composition of socket
- Remove utils/socket.h in favor of the new socket class
- Add unix_socket::pair() for creating socket pairs
- Add byte stream operators (<<, >>) to unix_socket

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
ComixHe added 2 commits April 10, 2026 18:39
- Add npos constant for subspan sentinel value
- Add operator[] for element access
- Add begin()/end() for iterator support

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
Complete the OCI hooks state-passing logic and fix several bugs:

- Pass container state JSON to hooks over stdin as required by OCI spec
- Fix socketpair created after fork (child had no socket)
- Fix env variable concatenation bug ('+' was pointer arithmetic)
- Fix waitpid EINTR/EAGAIN condition (&& should be ||)
- Add hook timeout support via sigtimedwait
- Fix poststop_hooks iterating over wrong hook list (poststart)
- Update all hook call sites to pass container_status_t

Also adapt to the new socket API:

- Replace unixSocketClient with unix_socket
- Use unix_socket::pair() instead of utils::socketpair()
- Use STDIN_FILENO/STDOUT_FILENO instead of utils::fileno()
- Update SPDX copyright years to 2026

Signed-off-by: ComixHe <ComixHe1895@outlook.com>
@ComixHe
ComixHe merged commit 636f2d1 into OpenAtom-Linyaps:master Apr 10, 2026
13 checks passed
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.

1 participant