signal to release an fd?
Rémi Denis-Courmont
remi at remlab.net
Sat May 21 11:26:14 PDT 2011
Le samedi 21 mai 2011 21:03:58 Stef Bon, vous avez écrit :
> Well, this issue does not only happen with a construction like mine.
>
> For example, when working on a document on a USB stick (or a partition
> on a harddisk) with LibreOffice for example, and you want to create another
> filesystem on it.
This does not strike me as a common occurence. And it would be far simpler to
"fix" LibreOffice to only keep file descriptors open while loading/saving
documents - if it is not already doing so.
USB mass storage gadget is the only real-life scenario that I've ever: to
expose a block device via USB MSC, the device must be unmounted. So
applications running on the USB gadget cannot it. This mostly affects handheld
devices.
Even then, that's more of a design bug. If you want to share the handheld
filesystem over USB, you should use a higher level protocol that does not
require raw block access, e.g. OBEX-FTP or PTP/MTP. That is also the only way
to not be stuck with the crappy old VFAT filesystem format.
> It's a very good and gentle service to the average user to have a
> mechanism which informs the app to do something, like for example a
> dialog informing the user and asking what to do.
And what do you suggest?
How do you canonicalize the references to the file needing closure over D-Bus
(or whatever IPC mechanism you use)? File descriptors are process-specific
values, so you cannot transfer
How does the recipient D-Bus application propagate the request top-down
through its architectural layers all the way to the component that "owns" the
file descriptor? How is this not going to break encapsulation and fail to gain
any real traction from applications andl libraries developers?
--
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis
More information about the xdg
mailing list