Bug 1100498 - RFE: non-polling mechanism to detect guestmount --no-fork readiness
Summary: RFE: non-polling mechanism to detect guestmount --no-fork readiness
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-22 22:58 UTC by Colin Walters
Modified: 2014-05-24 18:03 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-24 18:03:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Colin Walters 2014-05-22 22:58:49 UTC
In bug 916780 a feature was added to guestmount to avoid daemonizing, which allows the caller to watch its status via normal waitpid().  However, at the moment callers still have to use the pid file. 

It's possible to use inotify on the pid file to avoid polling, but another model might be a --with-ready-pipe-fd or so, where the caller provides a pipe (or eventfd) to guestmount, and it writes a byte when it's successfully mounted.

Comment 1 Richard W.M. Jones 2014-05-23 08:44:13 UTC
It probably works if you set the --pid-file to be a pipe :-)

However we can add a --fd=<N> option, analogous to the
guestunmount option.

Comment 2 Richard W.M. Jones 2014-05-23 10:53:19 UTC
Patches posted:
https://www.redhat.com/archives/libguestfs/2014-May/msg00091.html

Comment 3 Richard W.M. Jones 2014-05-24 18:03:46 UTC
This is now available in libguestfs >= 1.27.13.


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