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

Fix the bug that a container may not have ps command #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NitroCao
Copy link

@NitroCao NitroCao commented Sep 1, 2021

The reason why we should not execute ps command in containers:

  • some containers don't have ps command.
  • if a container shares the PID namespace with the host machine, the check command would report false positives.

The better way is to get the PID of the first process inside containers in the host PID namespace first, then find all processes whose PPID is the PID of the first process inside the container.

@konstruktoid konstruktoid self-assigned this Apr 30, 2022
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.

2 participants