[vlc-devel] [PATCH] filesystem: fix vlc_memfd when "/tmp" is missing

Rémi Denis-Courmont remi at remlab.net
Tue Oct 6 11:42:05 CEST 2015

Le 2015-10-06 12:22, Thomas Guillem a écrit :
> On Tue, Oct 6, 2015, at 09:56, Rémi Denis-Courmont wrote:
>> Le 2015-10-05 17:23, Thomas Guillem a écrit :
>> > Try using the TMPDIR environment variable if "/tmp" is missing.
>> In theory, that would be correct (though the patch seems insanely
>> intricate for that purpose). But in practice $TMPDIR seems often a
>> per-user directory, and thus it will always be a on regular file 
>> system.
>> memfd should really be on tmpfs or similar.
> But some systems don't have a tmpfs available, in that case it's 
> better
> to fallback to TMPDIR, non ?

POSIX says you should use $TMPDIR and fallback to /tmp only if $TMPDIR 
is unset.

But if there is no tmpfs filesystem and no memfd syscall, then I don't 
know any reasonable way to allocate named memory (old style SHM is not 
very "reasonable").

Rémi Denis-Courmont

More information about the vlc-devel mailing list