summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_drop.c
blob: e51a8d0efae15ebeb689950fd300402023a44f3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <errno.h>
#include <skalibs/djbunix.h>
#include <skalibs/unixmessage.h>

void unixmessage_drop (unixmessage_t const *m)
{
  int e = errno ;
  unsigned int i = m->nfds ;
  while (i--) fd_close(m->fds[i]) ;
  errno = e ;
}