This is used to get the PID of the qemu subprocess, mainly for
debugging and testing purposes.
For more information on the architecture of libguestfs,
see L<guestfs(3)>.");
+ ("get_pid", (RInt "pid", []), -1, [FishAlias "pid"],
+ [],
+ "get PID of qemu subprocess",
+ "\
+Return the process ID of the qemu subprocess. If there is no
+qemu subprocess, then this will return an error.
+
+This is an internal call used for debugging and testing.");
+
]
(* daemon_functions are any functions which cause some action
return g->memsize;
}
+int
+guestfs_get_pid (guestfs_h *g)
+{
+ if (g->pid > 0)
+ return g->pid;
+ else {
+ error (g, "get_pid: no qemu subprocess");
+ return -1;
+ }
+}
+
/* Add a string to the current command line. */
static void
incr_cmdline_size (guestfs_h *g)