diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-07-15 11:38:21 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-07-15 12:24:51 +0100 |
commit | f173543fd207bdc254a5eb75180d82ef25eacae9 (patch) | |
tree | 0f763d61695a1549f6a5f0784fb7e44ab90ad065 /src/guestfs.c | |
parent | 4b53a3737b76cad7aca407a0d9e37fed1d42ef69 (diff) | |
download | libguestfs-f173543fd207bdc254a5eb75180d82ef25eacae9.tar.gz libguestfs-f173543fd207bdc254a5eb75180d82ef25eacae9.tar.xz libguestfs-f173543fd207bdc254a5eb75180d82ef25eacae9.zip |
New APIs: set-pgroup, get-pgroup
If the pgroup flag is set in the handle, then the qemu and recovery
subprocesses are placed in separate process groups. The default is
false.
The purpose for setting up a process group is that ^C will not be
passed from the main process down to these processes (killing them).
This allows ^C and other keyboard events to be caught and handled in
the main process.
Diffstat (limited to 'src/guestfs.c')
-rw-r--r-- | src/guestfs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index b02bdb9d..e2b71594 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -801,6 +801,19 @@ guestfs__get_attach_method (guestfs_h *g) return ret; } +int +guestfs__set_pgroup (guestfs_h *g, int v) +{ + g->pgroup = !!v; + return 0; +} + +int +guestfs__get_pgroup (guestfs_h *g) +{ + return g->pgroup; +} + /* Note the private data area is allocated lazily, since the vast * majority of callers will never use it. This means g->pda is * likely to be NULL. |