i used function fork().
so i made two process.
parent process accepted socket fd and writing to shared memory.
then now. how can child process share parent's socket fd?
is this possible?
Thanks in advance
i used function fork().
so i made two process.
parent process accepted socket fd and writing to shared memory.
then now. how can child process share parent's socket fd?
is this possible?
Thanks in advance
The child inherits all the parent fd, a wonderfully powerful feature even in shell programming, but there is an fcntl flag that closes fd on exec*(), if that is also on your mind. I will google it for you, ging, first hit is good: