Bug 602592 - [RFE] expose guestfs_close in perl bindings
Summary: [RFE] expose guestfs_close in perl bindings
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-10 09:22 UTC by Matthew Booth
Modified: 2011-07-14 19:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-07-14 19:13:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Matthew Booth 2010-06-10 09:22:09 UTC
Currently the only way to close a guestfs handle in perl is to remove all references to it. There are circumstances where it is important to know that the guest handle is closed before proceeding, for example before attempting to unmount a volume which is being used by guestfs. In this case, a simple $g = undef will not suffice if a code change elsewhere has kept a reference to the handle.

Usage of libguestfs in this case would be made significantly more robust by exposing the close() call, allowing the handle to be explicitly closed regardless of remaining references. Attempting to use a reference after close() would result in an error.

Comment 1 Richard W.M. Jones 2010-06-10 11:21:04 UTC
That was an unwelcome tour around the guts of Perl ...

Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-June/msg00089.html

Comment 2 Richard W.M. Jones 2010-06-10 17:19:09 UTC
Updated patch:
https://www.redhat.com/archives/libguestfs/2010-June/msg00095.html


Note You need to log in before you can comment on or make changes to this bug.