git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
appliance: Document pipe fds.
[libguestfs.git]
/
src
/
launch.c
diff --git
a/src/launch.c
b/src/launch.c
index
0af8ed5
..
58fb0d1
100644
(file)
--- a/
src/launch.c
+++ b/
src/launch.c
@@
-1,5
+1,5
@@
/* libguestfs
/* libguestfs
- * Copyright (C) 2009-201
0
Red Hat Inc.
+ * Copyright (C) 2009-201
1
Red Hat Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@
-71,6
+71,7
@@
#include "guestfs_protocol.h"
static int launch_appliance (guestfs_h *g);
#include "guestfs_protocol.h"
static int launch_appliance (guestfs_h *g);
+static int64_t timeval_diff (const struct timeval *x, const struct timeval *y);
static int qemu_supports (guestfs_h *g, const char *option);
/* Add a string to the current command line. */
static int qemu_supports (guestfs_h *g, const char *option);
/* Add a string to the current command line. */
@@
-607,11
+608,13
@@
launch_appliance (guestfs_h *g)
close (wfd[1]);
close (rfd[0]);
close (wfd[1]);
close (rfd[0]);
+ /* Stdin. */
if (dup (wfd[0]) == -1) {
dup_failed:
perror ("dup failed");
_exit (EXIT_FAILURE);
}
if (dup (wfd[0]) == -1) {
dup_failed:
perror ("dup failed");
_exit (EXIT_FAILURE);
}
+ /* Stdout. */
if (dup (rfd[1]) == -1)
goto dup_failed;
if (dup (rfd[1]) == -1)
goto dup_failed;