ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 163a17a8354320a86302f6229db9ab1341b47eb7
parent c14983072b2c17d1b5d12e7aeb3c39bc9080823e
Author: sin <sin@2f30.org>
Date:   Mon,  2 Sep 2013 15:00:59 +0100

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

Diffstat:
Mpidof.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/pidof.c b/pidof.c @@ -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);