skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

fd_shutdown.c (233B)


      1 /* ISC license. */
      2 
      3 #include <skalibs/nonposix.h>
      4 #include <errno.h>
      5 #include <sys/socket.h>
      6 
      7 #include <skalibs/djbunix.h>
      8 
      9 void fd_shutdown (int fd, int h)
     10 {
     11   int e = errno ;
     12   shutdown(fd, h ? SHUT_WR : SHUT_RD) ;
     13   errno = e ;
     14 }