[kwlug-disc] Question about ... sockets?
Mikalai Birukou
mb at 3nsoft.com
Tue Feb 2 11:18:11 EST 2021
A need/want:
I want process to start some other process, giving it some way to
communicate with creator process. This communication should be only
between these two running processes, i.e. kernel help us here.
My currently limited understanding:
- Everyone do something that sounds precisely like this, e.g.
communication between Electron main and renderrer processes. It feels,
that I am missing some fundamental understanding here.
- When you grew out of user land, you encounter suggestions like
socket on localhost:port and unix socket on some path. Localhost:port is
not ok, cause everyone on the machine can connect. Unix socket has
protection on path with privileges. But I want a connection between two
specific processes only. In fact, if connection is dropped, created
process should close as well. Hacking thought within this limited choice
is make a path, start to listen, when created process connects, unlink
that path. But can I pass an open connection, and only it?
- How should process be started so that it isn't given implicitly any
resources from initializing process, only passing explicitly particular
open connection(s)? I head fork is making copies of descriptors :/ ? Is
there other way? Can someone explain this, or give links to
userland-parsable resources/docs?
Thank you.
More information about the kwlug-disc
mailing list