Track listen FDs in socket rocks [1/3] (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 6 Jan 2016 15:14:52 +0000 (10:14 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Thu, 14 Jan 2016 21:04:46 +0000 (16:04 -0500)
commit5153de41c3354bbb57fa303c48594f536cfa61c2
tree026f57d73eed2c2d596db1f064552d1f9874e5d7
parent36c10230c709bcb66f424c39c52641e0b2fda1fa
Track listen FDs in socket rocks [1/3] (XCC)

Instead of only opening the listen file on demand and having our user
close it (which is a huge mess), we just open it right away and close it
when the socket / Rock is closed.

This will help out epoll, which currently will deadlock if it attempts
to close a listen_fd while holding its own locks, since epoll itself has
a close callback.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/listen.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/plan9_sockets.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/plan9_sockets.h