A simple Python binding for https://github.com/sharvil/flingfd - a small, standalone C library to pass file descriptors across processes on Linux.
import flingfd
import os
fd = flingfd.simple_recv( '/tmp/uniquefile' )
os.write( fd, 'fling!' )
os.fsync( fd )
import flingfd
import sys
flingfd.simple_send( '/tmp/uniquefile', sys.stdout )
Installing is super easy:
- clone the repository
- issue
git submodule init && git submodule update
inside of it to getlibflingfd
sources - then
pip install -U .
orpython setup.py install
should work out of the box