Fixes excessive closes in accept()
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Jul 2014 04:55:21 +0000 (21:55 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Jul 2014 04:55:21 +0000 (21:55 -0700)
commit24dfa13409cb204fdc6af5849a0216ec44da563d
tree656bcd1e16abd7fb5fc7ecdfe7ced574819b6499
parent27956684cbce00e9c6d79edf92a4827e2015be3d
Fixes excessive closes in accept()

The extra close brought in at 1a7a2a40, when fixing up the sockets code.
_sock_data() closes whatever ctlfd it is passed.

Incidentally, that was closing it too many times, though that bug wasn't
the one causing all of our problems.

The kernel now spits out a warning if close fails, since nobody checks
its retval.  If you see that somewhere, it's time to start asserting
your closes succeed.
kern/src/syscall.c
user/bsd/accept.c
user/bsd/socket.c