-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
This will require feature testing to be done (see https://github.com/koraa/pipe_exec/tree/karo/feature-testing):
When fexecve & memfd_create is not available, we should:
- if stdin is a normal file, determine it's path and start using execve
- Otherwise use a temporary file in /tmp/ and if that fails try $HOME
When just memfd_create is missing we should:
- Try to execute the fd using fexecve
- Otherwise use a temporary file in /tmp/ and if that fails try $HOME
Using a temporary file should work like this:
- Create a temp file in /tmp/ using a random name
- Fill using transfer_mmap
- Make executable
- Fork a subprocess
- In main process, use execve
- In fork, wait for the main process to execve and then unlink the file
The signaling mechanism between main and fork needs to be determined…