Join Nostr
2025-03-05 05:52:23 UTC
in reply to

Emelia/Emi on Nostr: The latter is actually piping the output of a subshell into stdin, although it is the ...

The latter is actually piping the output of a subshell into stdin, although it is the same construct as other FDs. From some digging, the correct forms are either<code>exec 3&lt;&gt; /path/to/file<br>bwrap --seccomp 3 ...<br></code>

or <code>bwrap --seccomp 3 ... 3&lt;/path/to/file<br></code>

depending on if you want the fd to be read/write or read-only.

And /proc/$pid/fd/ is one and the same with the integer file descriptors, it's just a way to see which process has what files open, and optionally to access them "out of band" (which is occasionally useful, since you can retrieve open-but-deleted files that way)