Skip to content

Wrong logic in matching the process name #108

@HiGarfield

Description

@HiGarfield

if (strncmp(basename(proc.command), process_name, strlen(process_name))==0 && kill(pid,SIGCONT)==0) {

"strncmp" is not a correct way.

For example, if we use "cpulimit -e abc -l 30", then the process with the name "abcd" may be limited.

The correct way is to use "strcmp".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions