X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=src%2Fguestfs.pod;h=2fa3acebe842b2695df9e5b91cd5c32be9686e4a;hp=0f60c8e59050f8f3abcfd4526d39130aa4388887;hb=eb566f7dc7974b42ac65729a2e5e5bcee329a0a9;hpb=91b00dc092be17a309f14fc35f41dbf1e41c4c58 diff --git a/src/guestfs.pod b/src/guestfs.pod index 0f60c8e..2fa3ace 100644 --- a/src/guestfs.pod +++ b/src/guestfs.pod @@ -1042,6 +1042,24 @@ The callback function C will be called when the child process becomes ready first time after it has been launched. (This corresponds to a transition from LAUNCHING to the READY state). +=head2 guestfs_set_close_callback + + typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque); + void guestfs_set_close_callback (guestfs_h *g, + guestfs_close_cb cb, + void *opaque); + +The callback function C will be called while the handle +is being closed (synchronously from L). + +Note that libguestfs installs an L handler to try to +clean up handles that are open when the program exits. This +means that this callback might be called indirectly from +L, which can cause unexpected problems in higher-level +languages (eg. if your HLL interpreter has already been cleaned +up by the time this is called, and if your callback then jumps +into some HLL function). + =head1 BLOCK DEVICE NAMING In the kernel there is now quite a profusion of schemata for naming