Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65267bcc authored by Dmitriy Ivanov's avatar Dmitriy Ivanov
Browse files

Fix ps <process name>

 Use /proc/pid/cmdline instead of /proc/pid/stat
 to filter process by name.

Bug: 8638853
Change-Id: I469f55186e0d8b93311438cc8a1d0f73834f3fb5
parent c6dead70
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ static int ps_line(int pid, int tid, char *namefilter)
        strcpy(user,pw->pw_name);
    }
    
    if(!namefilter || !strncmp(name, namefilter, strlen(namefilter))) {
    if(!namefilter || !strncmp(cmdline[0] ? cmdline : name, namefilter, strlen(namefilter))) {
        if (display_flags & SHOW_MACLABEL) {
            fd = open(macline, O_RDONLY);
            strcpy(macline, "-");