Bug 602592 - [RFE] expose guestfs_close in perl bindings
Summary: [RFE] expose guestfs_close in perl bindings
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs   
(Show other bugs)
Version: unspecified
Hardware: All Linux
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-07-14 19:13:07 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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:

Comment 2 Richard W.M. Jones 2010-06-10 17:19:09 UTC
Updated patch:

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