> I looked into the underlying C function 'socket_shutdown' (in file
> runtime/Clib/csocket.c).
> It calls shutdown first and contains a comment by Manuel:
>       /* MS: 19 Aug 2008, we don't have to close fd */
>       /* since it will be closed automatically with */
>       /* SOCKET( sock ).input                       */
> I don' understand the comment because the C shutdown
> call comes before any hooks or similar.
> 
> In my code, I use this pattern:
> (socket-close s)
> (socket-shutdown s)
I'm not sure to understand the comment either! Looking at the code
calling both socket-close and socket-shutdown is useless and both 
set fd to -1 and both check if fd > 0. Only one of this function does
actually something (socket-close in your case). 

I have never been able to understand when shutdown is needed. Hence, it
could be that this part of the C Bigloo runtime is a non sense. If
someone can enlighten me, I will appreciate it.

Cheers,

-- 
Manuel

Reply via email to