Permalink
Browse files

dont create errsv for the sake of perror, just call strerror

  • Loading branch information...
1 parent 87e4fbb commit 336900ac89a85152f61fb76b0d1c1ae3f7b19078 @falconindy committed Apr 20, 2011
Showing with 1 addition and 5 deletions.
  1. +1 −5 init.c
View
@@ -47,12 +47,8 @@ static void forkexecwait(char **argv) { /* {{{ */
}
if (pid == 0) {
- int errsv;
execv(argv[0], argv);
- errsv = errno;
- fprintf(stderr, "failed to launch %s\n", argv[0]);
- errno = errsv;
- perror("");
+ fprintf(stderr, "failed to launch %s: %s\n", argv[0], strerror(errno));
}
/* block for process exit */

0 comments on commit 336900a

Please sign in to comment.