diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-10-13 11:56:52 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-10-13 15:25:13 +0100 |
commit | 11be7d8eee16e6249ed2868b5bd552f29508ec02 (patch) | |
tree | 46c255e7d1ad2eed24dfe10194dc3021c8ba23e4 /fish/guestfish.pod | |
parent | baa1618e0f917017c1934b7da41250029c1791ef (diff) | |
download | libguestfs-11be7d8eee16e6249ed2868b5bd552f29508ec02.tar.gz libguestfs-11be7d8eee16e6249ed2868b5bd552f29508ec02.tar.xz libguestfs-11be7d8eee16e6249ed2868b5bd552f29508ec02.zip |
fish: docs: note how to clean up the remote process properly.
Killing it is always a bad idea, because the qemu subprocess will be
left hanging around. The best thing is to send the exit command.
This also makes the change to virt-sysprep.
Diffstat (limited to 'fish/guestfish.pod')
-rw-r--r-- | fish/guestfish.pod | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fish/guestfish.pod b/fish/guestfish.pod index 022e03e2..81909696 100644 --- a/fish/guestfish.pod +++ b/fish/guestfish.pod @@ -996,14 +996,15 @@ and cleans up guestfish when the script exits: exit 1 fi - kill_guestfish () + cleanup_guestfish () { - kill $GUESTFISH_PID >/dev/null 2>&1 ||: + guestfish --remote -- exit >/dev/null 2>&1 ||: } - trap kill_guestfish EXIT + trap cleanup_guestfish EXIT ERR - guestfish --remote run - # etc. + guestfish --remote -- run + + # ... =head2 REMOTE CONTROL RUN COMMAND HANGING |