From 1fc0b941d6d14ac2b8a5b0e40ab3c9981c034d41 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Aug 2010 11:45:00 +0200 Subject: [PATCH] flock: properly report exec() errors Reported-by: Barry Davis Signed-off-by: Karel Zak --- sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 1f1c563b..20004cae 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -298,8 +298,8 @@ int main(int argc, char *argv[]) } else if ( f == 0 ) { if ( do_close ) close(fd); - err = errno; execvp(cmd_argv[0], cmd_argv); + err = errno; /* execvp() failed */ fprintf(stderr, "%s: %s: %s\n", program, cmd_argv[0], strerror(err)); _exit((err == ENOMEM) ? EX_OSERR: EX_UNAVAILABLE); -- 2.39.5