lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.038 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site