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

Not exact ppid match - Issue while searching for parent process id #5

Open
sumitpawar opened this issue Jun 7, 2018 · 0 comments
Open

Comments

@sumitpawar
Copy link

Don't know if this is a feature or is as intended.

Issue for ppid: 1, you get all parent processes that have the digit: "1" in them, eg: processes with ppid "12345" are selected as well.

ps.lookup({
command: 'cmd',
ppid: 1
}, function(err, res) {
if(err) {
console.log(err);
}
// more code ...
});

WORKAROUND: you can use a regex: ppid: "^1$" to get exact matches:

ps.lookup({
command: 'cmd',
ppid: "^1$"
}, function(err, res) {
if(err) {
console.log(err);
}
// more code ...
});

Thanks!

antongolub added a commit to webpod/ps that referenced this issue Mar 26, 2024
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

No branches or pull requests

1 participant