Implement shutdown() (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Mar 2016 19:39:22 +0000 (15:39 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 22 Mar 2016 19:47:38 +0000 (15:47 -0400)
commit697eed87adbaa02b32a106161a5f05ef9cea3cd1
tree24d872ee3b48e57d82f714e87c7c86af85a1a9f6
parent2088a3d112b9a42709cb4aa2a914c251114b5dd3
Implement shutdown() (XCC)

We had been just closing the FD, which is clearly wrong (you may have been
getting warnings from the kernel about this).  Best case, you just get a
warning.  Worst case, you accidentally close another FD in a concurrent
program.

I don't know if the TCP code is right.  It sends a FIN.  Maybe it doesn't
send it the right way, or maybe we should do things for the other states
too.

It's better than it was before.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ip.h
kern/src/net/devip.c
kern/src/net/tcp.c
tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/shutdown.c