Skip to content

Instantly share code, notes, and snippets.

@cgwalters
Last active May 18, 2019 15:37
Show Gist options
  • Save cgwalters/c87651aa875630d1516238da3589b27e to your computer and use it in GitHub Desktop.
Save cgwalters/c87651aa875630d1516238da3589b27e to your computer and use it in GitHub Desktop.

fdtest.sh which is a reduced version of coreos-assembler run:

#!/bin/bash
set -xeuo pipefail
t=$(mktemp)
exec 4<> "${t}"
echo foo > ${t}
rm -f ${t}
ls -al /proc/self/fd
cat /proc/self/fd/4

Running this inside my toolbox (fedora-toolbox wrapping podman) gives me: cat: /proc/self/fd/4: No such file or directory

If I run this on my host, works fine.

If I do: env TMPDIR=$(pwd) /srv/walters/tmp/fdtest.sh it also works.

Something to do with crossing mounts? Hm, no it must be crossing mount namespaces, since I have tmpfs for /tmp on my host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment