Skip to content
Commit 6908c8c8 authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot Committed by Simon Ser
Browse files

cursor: Use memfd_create() when available



This (so-far) Linux-only API lets users create file descriptors purely
in memory, without any backing file on the filesystem and the race
condition which could ensue when unlink()ing it.

It also allows seals to be placed on the file, ensuring to every other
process that we won’t be allowed to shrink the contents, potentially
causing a SIGBUS when they try reading it.

This patch is best viewed with the -w option of git log -p.

Signed-off-by: default avatarEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: default avatarSimon Ser <contact@emersion.fr>
parent 9d63c9ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment