Bug 602592 - [RFE] expose guestfs_close in perl bindings
[RFE] expose guestfs_close in perl bindings
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-10 05:22 EDT by Matthew Booth
Modified: 2011-07-14 15:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-14 15:13:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Booth 2010-06-10 05:22:09 EDT
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 07:21:04 EDT
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 13:19:09 EDT
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.