summaryrefslogtreecommitdiff
path: root/procps/pgrep.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/pgrep.c')
-rw-r--r--procps/pgrep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/pgrep.c b/procps/pgrep.c
index dc7ffff..7616027 100644
--- a/procps/pgrep.c
+++ b/procps/pgrep.c
@@ -128,7 +128,7 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
bb_show_usage();
if (argv[0])
- xregcomp(&re_buffer, argv[0], REG_EXTENDED | REG_NOSUB);
+ xregcomp(&re_buffer, argv[0], OPT_ANCHOR ? REG_EXTENDED : (REG_EXTENDED|REG_NOSUB);
matched_pid = 0;
cmd_last = NULL;