From: Richard Jones Date: Fri, 7 May 2010 21:50:50 +0000 (+0100) Subject: daemon: Use 'error' instead of 'perror' before calling 'abort'. X-Git-Tag: 1.3.11~13 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=f606a79ed7a20ee59bc0755b1030c6d29e503724;p=libguestfs.git daemon: Use 'error' instead of 'perror' before calling 'abort'. --- diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index ef28d9b..c0d524a 100644 --- a/daemon/guestfsd.c +++ b/daemon/guestfsd.c @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef HAVE_PRINTF_H # include @@ -758,20 +759,20 @@ commandrvf (char **stdoutput, char **stderror, int flags, */ 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) { - perror ("pipe"); + error (0, errno, "pipe"); abort (); } } pid = fork (); if (pid == -1) { - perror ("fork"); + error (0, errno, "fork"); abort (); } @@ -805,7 +806,7 @@ commandrvf (char **stdoutput, char **stderror, int flags, stdin_pid = fork (); if (stdin_pid == -1) { - perror ("fork"); + error (0, errno, "fork"); abort (); }