* Print an error if the exec fails.

svn path=/nixos/trunk/; revision=16732
This commit is contained in:
Eelco Dolstra 2009-08-16 16:46:00 +00:00
parent 3b931f7861
commit f31e2718b7
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,8 @@
#include <fcntl.h>
#include <dirent.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
/* Make sure assertions are not compiled out. */
#undef NDEBUG
@ -72,5 +74,8 @@ int main(int argc, char * * argv)
execve(real, argv, environ);
fprintf(stderr, "%s: cannot run `%s': %s\n",
argv[0], real, strerror(errno));
exit(1);
}