void-packages/srcpkgs/procps/patches/pgrep_usage_exitcode.patch

16 lines
458 B
Diff

Author: <hesso@pool.math.tu-berlin.de>
Description: Distinguish between invalid commandline parameters and '-?'.
Index: b/pgrep.c
===================================================================
--- a/pgrep.c 2009-11-24 21:00:45.000000000 +1100
+++ b/pgrep.c 2009-11-24 21:00:49.000000000 +1100
@@ -681,7 +681,7 @@
// case 'z': // Solaris: match by zone ID
// break;
case '?':
- usage (opt);
+ usage (optopt?optopt:opt);
break;
}
}