Messages in this thread | | | Date | Tue, 2 Mar 2004 16:02:22 +0200 (EET) | From | Mihai RUSU <> | Subject | Re: epoll and fork() |
| |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 2 Mar 2004, Richard B. Johnson wrote:
> The child's fds are separate, though. The parent can close > its fds without affecting the child's and the child can close > its fds without affecting the parent.
They are not separate. It just that when using close you decrement the "reference" count to the "real" fd struct (like done on FS inodes). When reaches 0 its closed. So still as I said, fds are shared ;)
I havent check kernel sources, I just say that the fact the you can and need to close() a shared fd on each sharing process doesnt mean the sockets are independent.
- -- Mihai RUSU Email: dizzy@roedu.net GPG : http://dizzy.roedu.net/dizzy-gpg.txt WWW: http://dizzy.roedu.net "Linux is obsolete" -- AST -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFARJPwPZzOzrZY/1QRAulNAKDAHLz2mVPIfADedlIWA2U3QQFuFQCdFQyo V5hpmpt+1r4DQDP1PTQig/k= =HtbW -----END PGP SIGNATURE----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |