3 ms·
There is still a small window between touch and rm for the file to not be cleaned up. There is no easy way around it with standard shell and coreutils, but ther
by hawski 3y ago
There is still a small window between touch and rm for the file to not be cleaned up. There is no easy way around it with standard shell and coreutils, but there could be a tool that would use memfd_create(2) and exec user's command passing the /dev/fd/XXX filename somehow.
A simple case could work like this:
$ memfile /usr/bin/echo
/dev/fd/3
$