aristanetworks / bst

A one-stop shop for process isolation
MIT License
99 stars 9 forks source link

exe: add --close-fd to close file descriptors #72

Closed Snaipe closed 1 year ago

Snaipe commented 1 year ago

This allows users to specify individual file descriptors or fd ranges that must be closed prior to executing the spacetime program.

The close semantics are that the file descriptors must be closed after the setup program executes, but before the spacetime program executes.

Besides ensuring that no file descriptors leak when using bst in scripts or other automation, this feature also allows the use of file descriptors to convey out-of-band data to the setup program without leaking said file descriptor to the spacetime process.