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:
Wade Berrier 2011-06-08 15:46:55 -06:00 committed by Denys Vlasenko
parent 6295d273ad
commit 000ae5cefe

View File

@ -128,7 +128,7 @@ int pgrep_main(int argc UNUSED_PARAM, char **argv)
bb_show_usage();
if (argv[0])
xregcomp(&re_buffer, argv[0], 0);
xregcomp(&re_buffer, argv[0], REG_EXTENDED | REG_NOSUB);
matched_pid = 0;
cmd_last = NULL;