pkill/pgrep: support extended regular expressions
Done by enabling the REG_EXTENDED and REG_NOSUB regex flags, which also increases compatibility with the procps versions. Signed-off-by: Wade Berrier <wade_berrier@appsig.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6295d273ad
commit
000ae5cefe
@ -128,7 +128,7 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
|
|
||||||
if (argv[0])
|
if (argv[0])
|
||||||
xregcomp(&re_buffer, argv[0], 0);
|
xregcomp(&re_buffer, argv[0], REG_EXTENDED | REG_NOSUB);
|
||||||
|
|
||||||
matched_pid = 0;
|
matched_pid = 0;
|
||||||
cmd_last = NULL;
|
cmd_last = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user