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

Remove ownerProcess field from LegacyDescriptor #2245

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

stevenengler
Copy link
Contributor

A file description is not owned by any one process, so the LegacyDescriptor should not have this ownerProcess field. Removing this field should make it easier to support fork() (#1987) and to support a non-ref-counted rust Process object in the future.

The one place where this field is used is for listening TCP sockets, so the TCPServer struct now holds this process reference instead. The way that it's used is incorrect (#1780), but fixing that issue is much more difficult.

@stevenengler stevenengler added Type: Maintenance Refactoring, cleanup, documenation, or process improvements Component: Main Composing the core Shadow executable labels Jun 28, 2022
@stevenengler stevenengler self-assigned this Jun 28, 2022
@github-actions github-actions bot added the Component: Build Build/install tools and dependencies label Jun 28, 2022
src/main/host/descriptor/tcp.c Outdated Show resolved Hide resolved
@stevenengler stevenengler merged commit 3e35087 into shadow:main Jul 1, 2022
@stevenengler stevenengler deleted the remove-owning-proc branch July 1, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Build Build/install tools and dependencies Component: Main Composing the core Shadow executable Type: Maintenance Refactoring, cleanup, documenation, or process improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants