Skip to content

Assign PIDs in process creation order#2908

Merged
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:pid-assignment
May 4, 2023
Merged

Assign PIDs in process creation order#2908
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:pid-assignment

Conversation

@sporksmith
Copy link
Copy Markdown
Contributor

@sporksmith sporksmith commented May 4, 2023

  • Drop guarantee about PID assignment order. Afaik Linux doesn't provide any similar guarantee.
  • Assign PIDs in process creation order instead of based on the ordering in the config file. This is closer to what Linux does in practice. The previous behavior would have been especially strange once we implemented fork.
  • Fix a bug where shadow crashes if the process is already gone at its shutdown_time.

@github-actions github-actions bot added Component: Build Build/install tools and dependencies Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks labels May 4, 2023
sporksmith added 2 commits May 4, 2023 13:34
We previously added this guarantee so that graceful shutdown could be
done via the `kill` command. This can now be done more easily using
`shutdown_signal` and `shutdown_time`.
This more closely reflects the behavior on a Linux system.
@sporksmith sporksmith added this to the Code health and maintenance milestone May 4, 2023
@sporksmith sporksmith requested a review from stevenengler May 4, 2023 19:17
@sporksmith sporksmith marked this pull request as ready for review May 4, 2023 19:29
@sporksmith sporksmith enabled auto-merge May 4, 2023 19:37
@sporksmith sporksmith merged commit 7ec372d into shadow:main May 4, 2023
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: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable Component: Testing Unit and integration tests and frameworks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants