diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-03-09 22:45:08 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | b9e2dff07fe8b82a50b081b6032e547632e338f9 (patch) | |
tree | a0bdb58cb9e53dab9d030210e5c4f38f00e2d00d /doc | |
parent | 059f624b552e0cedf6683bd7dad62ed950e9f5b4 (diff) |
fd-util: add new helper call fd_duplicate_data_fd()
This call creates an fd from another fd containing the same data.
Specifically, repeated read() on the returned fd should return the same
data as the original fd. This call is useful when we want to copy data
out of disk images and suchlike, and want to be pass fds with the data
around without having to keep the disk image continously mounted.
The implementation tries to be somewhat smart and tries to prefer
memfds/pipes over files in /tmp or /var/tmp based on the size of the
data, but has appropropriate fallbacks in place.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions