How to execute a program from file descriptor?
- by stribika
I need to execute a file when I only know the descriptor. It is also possible that there are no links to the file so finding out the name somehow is not an option. All the execve(), execvp(), etc functions take a file name. dlopen() also takes a name.
Ugly solutions (like reading the file and calling some function pointer) are OK.