mirror of git://git.suckless.org/ubase
Ignore leading '-' in command name for pidof(8)
This commit is contained in:
parent
c14983072b
commit
163a17a835
2
pidof.c
2
pidof.c
|
@ -82,6 +82,8 @@ main(int argc, char *argv[])
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
cmd = basename(cmdline);
|
cmd = basename(cmdline);
|
||||||
}
|
}
|
||||||
|
if (cmd[0] == '-')
|
||||||
|
cmd++;
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
if (strcmp(cmd, argv[i]) == 0) {
|
if (strcmp(cmd, argv[i]) == 0) {
|
||||||
putword(entry->d_name);
|
putword(entry->d_name);
|
||||||
|
|
Loading…
Reference in New Issue