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

Process: remove "hasn't started" state #2869

Merged
merged 8 commits into from
Apr 13, 2023

Conversation

sporksmith
Copy link
Contributor

Refactor so that we create and start the Process's first thread before we actually create the Process object. This lets us remove some fields from Process that are only needed when starting the Process, and remove some Option wrappers around other fields that were previously only populated after start.

I think this is generally an improvement, but in particular is nice to get done before further implementing #2034, and I think will also be helpful for implementing fork.

@sporksmith sporksmith self-assigned this Apr 12, 2023
@github-actions github-actions bot added Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable labels Apr 12, 2023
src/main/host/process.rs Show resolved Hide resolved
This also drops the performance timer for creating the thread group
leader.
The handler really only existed and worked for our defunct ptrace-based
implementation. Remove it until it's actually supported.

Fixes shadow#2718
This also removes `Process::has_started`; there is no longer such a
thing as a `Process` that hasn't been started.
@sporksmith sporksmith merged commit 0fe3be4 into shadow:main Apr 13, 2023
21 checks passed
@sporksmith sporksmith deleted the process-refactor-start branch April 13, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants