I'm trying to communicate with worker process that uses file descriptors 3..6 for data transfer.
I have been able to hook into Command using
command.pre_exec() to create those file descriptors, but something isn't quite working right and with https://github.com/rust-lang/rfcs/pull/2939 not moving much there is no nice API and in general very little information (and I'd prefer to not going as low as https://fraserblog.codewise.org/rust-and-file-descriptors/ does with forking the process myself.
At this moment I have a process starting, but libuv-based code inside worker errors out with
uv_read_start() failed: socket is not connected.
Here is the relevant code I have so far: https://github.com/nazar-pc/mediasoup/blob/3070625a1bbcf52539790c3446881325ed020131/rust/src/worker/channels.rs#L120-L161
Any ideas or suggestions greatly appreciated!