Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor process and channel code #388

Merged
merged 4 commits into from
Oct 16, 2021
Merged

Conversation

yihuaf
Copy link
Collaborator

@yihuaf yihuaf commented Oct 15, 2021

  1. Refactor the main process related code into its own mod.
  2. Implemented channel with socketpair. The channel can now send anything that implements serialize and deserialize, making it much more flexible. The channel can also send file descriptors across process now. This will be needed when implementing seccomp notify. Without this, we will have to use pidfd_getfd syscall, which only available in kernel > 5.6.

Submitting this PR before seccomp notify change, since this will make the review much easier.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2021

Codecov Report

Merging #388 (e1ae89f) into main (5ae2385) will increase coverage by 0.73%.
The diff coverage is 72.97%.

@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
+ Coverage   76.34%   77.07%   +0.73%     
==========================================
  Files          52       52              
  Lines        8306     8336      +30     
==========================================
+ Hits         6341     6425      +84     
+ Misses       1965     1911      -54     

@yihuaf yihuaf requested a review from utam0k October 15, 2021 05:08
src/process/main.rs Outdated Show resolved Hide resolved
@yihuaf yihuaf requested a review from utam0k October 15, 2021 08:22
@yihuaf yihuaf changed the title Refactor Refactor process and channel code Oct 15, 2021
Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

Awesome

@utam0k utam0k merged commit 66c2eab into youki-dev:main Oct 16, 2021
@yihuaf yihuaf deleted the yihuaf/refactor branch October 16, 2021 08:11
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.

3 participants