Displaying 1 result from an estimated 1 matches for "helper_error".
Did you mean:
help_error
2010 Sep 20
1
[PATCH] Fix error launching libguestfs when euid != uid
...rgv[] = { strdup("/bin/sh"), strdup("-c"), cmd, NULL };
+ if (execv("/bin/sh", argv) == -1) {
+ perror("execv");
+ exit(1);
+ }
+ }
+
+ FILE *pp = fdopen(fds[0], "r");
+ if (pp == NULL) {
+ perror("fdopen");
+ goto helper_error;
+ }
char checksum[256];
if (fgets (checksum, sizeof checksum, pp) == NULL) {
- pclose (pp);
- return NULL;
+ fclose (pp);
+ goto helper_error;
}
- if (pclose (pp) == -1) {
- perror ("pclose");
+ fclose (pp);
+ if (waitpid(pid, NULL, 0) == -1) {
+ perror...