From 62fa0883be6b2a51f8e69275c4cb31557e84b79f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 1 Feb 2018 15:40:43 +0100 Subject: text-utils: use errexec() Signed-off-by: Karel Zak --- text-utils/pg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'text-utils/pg.c') diff --git a/text-utils/pg.c b/text-utils/pg.c index ed9eb415a..f441c04f0 100644 --- a/text-utils/pg.c +++ b/text-utils/pg.c @@ -1380,9 +1380,8 @@ static void pgfile(FILE *f, const char *name) my_sigset(SIGTERM, oldterm); execl(sh, sh, "-c", cmd.cmdline + 1, NULL); - warn(_("failed to execute %s"), sh); - _exit(0177); - /* NOTREACHED */ + errexec(sh); + break; } case -1: mesg(_("fork() failed, " -- cgit v1.2.3-55-g7522