Comment on Opening /proc/self/fd/1 is not the same as dup(1)parentComments−hawski2yI wonder now if one could emulate fork-shenanigans-exec by:- clone CLONE_FILES with AF_UNIX socketpair- send file descriptors through the socket- do whatever was in shenanigans (you have the socket for communication/RPC/whatever)- execor maybe even easier:- clone CLONE_FILES with pipe or two- do whatever was in shenanigans (you have the pipe for communication/RPC/whatever)- exec
Comments
I wonder now if one could emulate fork-shenanigans-exec by:
- clone CLONE_FILES with AF_UNIX socketpair
- send file descriptors through the socket
- do whatever was in shenanigans (you have the socket for communication/RPC/whatever)
- exec
or maybe even easier:
- clone CLONE_FILES with pipe or two
- do whatever was in shenanigans (you have the pipe for communication/RPC/whatever)
- exec