git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ubuntu: Revert install-kernel to debirf default script.
[libguestfs.git]
/
daemon
/
guestfsd.c
diff --git
a/daemon/guestfsd.c
b/daemon/guestfsd.c
index
cd51f44
..
c0d524a
100644
(file)
--- a/
daemon/guestfsd.c
+++ b/
daemon/guestfsd.c
@@
-41,6
+41,7
@@
#include <sys/wait.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/wait.h>
#include <arpa/inet.h>
#include <netinet/in.h>
+#include <errno.h>
#ifdef HAVE_PRINTF_H
# include <printf.h>
#ifdef HAVE_PRINTF_H
# include <printf.h>
@@
-758,20
+759,20
@@
commandrvf (char **stdoutput, char **stderror, int flags,
*/
if (pipe (so_fd) == -1 || pipe (se_fd) == -1) {
*/
if (pipe (so_fd) == -1 || pipe (se_fd) == -1) {
-
perror (
"pipe");
+
error (0, errno,
"pipe");
abort ();
}
if (flag_copy_stdin) {
if (pipe (stdin_fd) == -1) {
abort ();
}
if (flag_copy_stdin) {
if (pipe (stdin_fd) == -1) {
-
perror (
"pipe");
+
error (0, errno,
"pipe");
abort ();
}
}
pid = fork ();
if (pid == -1) {
abort ();
}
}
pid = fork ();
if (pid == -1) {
-
perror (
"fork");
+
error (0, errno,
"fork");
abort ();
}
abort ();
}
@@
-781,9
+782,10
@@
commandrvf (char **stdoutput, char **stderror, int flags,
dup2 (stdin_fd[0], 0);
close (stdin_fd[0]);
close (stdin_fd[1]);
dup2 (stdin_fd[0], 0);
close (stdin_fd[0]);
close (stdin_fd[1]);
- } else
+ } else
{
/* Set stdin to /dev/null (ignore failure) */
open ("/dev/null", O_RDONLY);
/* Set stdin to /dev/null (ignore failure) */
open ("/dev/null", O_RDONLY);
+ }
close (so_fd[0]);
close (se_fd[0]);
if (!(flags & COMMAND_FLAG_FOLD_STDOUT_ON_STDERR))
close (so_fd[0]);
close (se_fd[0]);
if (!(flags & COMMAND_FLAG_FOLD_STDOUT_ON_STDERR))
@@
-804,7
+806,7
@@
commandrvf (char **stdoutput, char **stderror, int flags,
stdin_pid = fork ();
if (stdin_pid == -1) {
stdin_pid = fork ();
if (stdin_pid == -1) {
-
perror (
"fork");
+
error (0, errno,
"fork");
abort ();
}
abort ();
}