From: Karel Zak Date: Fri, 20 Aug 2010 09:45:00 +0000 (+0200) Subject: flock: properly report exec() errors X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fc0b941d6d14ac2b8a5b0e40ab3c9981c034d41;p=util-linux flock: properly report exec() errors Reported-by: Barry Davis Signed-off-by: Karel Zak --- 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);