1
0
mirror of git://git.suckless.org/ubase synced 2024-12-22 06:40:38 +00:00

Ignore leading '-' in command name for pidof(8)

This commit is contained in:
sin 2013-09-02 15:00:59 +01:00
parent c14983072b
commit 163a17a835

View File

@ -82,6 +82,8 @@ main(int argc, char *argv[])
*p = '\0';
cmd = basename(cmdline);
}
if (cmd[0] == '-')
cmd++;
for (i = 0; i < argc; i++) {
if (strcmp(cmd, argv[i]) == 0) {
putword(entry->d_name);