From 2737850e66c9bac16d6c042a292503992968f9af Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Fri, 1 Nov 2019 02:17:54 +0000 Subject: [PATCH] pgrep: Add a newline after regex error messages The message from 'regerror' does not include a newline. Test with `pgrep '*'`. Signed-off-by: Craig Small --- pgrep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pgrep.c b/pgrep.c index 90e42211..71e82650 100644 --- a/pgrep.c +++ b/pgrep.c @@ -497,8 +497,7 @@ static regex_t * do_regcomp (void) if (re_err) { regerror (re_err, preg, errbuf, sizeof(errbuf)); - fputs(errbuf,stderr); - exit (EXIT_USAGE); + xerrx(EXIT_USAGE, errbuf); } } return preg;