-
- Downloads
glnx-fdio: try $TMPDIR if /var/tmp doesn't exist
`glnx_open_anonymous_tmpfile` attempts to create an fd in `/var/tmp` regardless of the value of `$TMPDIR`. This is _usually_ okay, but can fail in some contexts, such as in the [NixOS][1] build environment, which doesn't have `/var` mapped at all. To avoid failing in this case, if the inner call to `glnx_open_anonymous_tmpfile_full` fails, we retrieve the value of `$TMPDIR` and try calling `glnx_open_anonymous_tmpfile_full` again with that directory instead. In the fast path (i.e. where `/var/tmp` exists), functionality is unchanged. [1]: https://nixos.org/
Loading
Please register or sign in to comment