Skip to content

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

Description

@sumitpawar

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions