Skip to content

Commit

Permalink
dont create errsv for the sake of perror, just call strerror
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Apr 20, 2011
1 parent 87e4fbb commit 336900a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions init.c
Expand Up @@ -47,12 +47,8 @@ static void forkexecwait(char **argv) { /* {{{ */
} }


if (pid == 0) { if (pid == 0) {
int errsv;
execv(argv[0], argv); execv(argv[0], argv);
errsv = errno; fprintf(stderr, "failed to launch %s: %s\n", argv[0], strerror(errno));
fprintf(stderr, "failed to launch %s\n", argv[0]);
errno = errsv;
perror("");
} }


/* block for process exit */ /* block for process exit */
Expand Down

0 comments on commit 336900a

Please sign in to comment.