Files
Arquivotheca.Solaris-2.5/lib/libbc/libc/sys/common/shutdown.c
seta75D 7c4988eac0 Init
2021-10-11 19:38:01 -03:00

25 lines
308 B
C
Executable File

#include <sys/errno.h>
#include <sys/types.h>
#include <sys/socket.h>
extern int errno;
#define N_ENOTCONN 134
int
shutdown(s, how)
register int s;
int how;
{
int a;
if ((a = _shutdown(s, how)) == -1) {
if (errno == N_ENOTCONN) {
errno = 0;
a = 0;
} else
maperror(errno);
}
return(a);
}