diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-04 19:00:46 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-01-04 19:00:46 +0000 |
commit | 5b4cf1798bfaf7be1dfaea36614757db80cae23d (patch) | |
tree | 3ab634ccb9bfe4de6c50be8c0f1cef48d2d53914 /src/libunixonacid | |
parent | d76cbe1a8d6ae1e839bd7613f3291da2c9b042d0 (diff) | |
download | skalibs-5b4cf1798bfaf7be1dfaea36614757db80cae23d.tar.xz |
Add unixmessage_drop and some stuff in skaclient
Diffstat (limited to 'src/libunixonacid')
-rw-r--r-- | src/libunixonacid/unixmessage_drop.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libunixonacid/unixmessage_drop.c b/src/libunixonacid/unixmessage_drop.c new file mode 100644 index 0000000..7fa34fb --- /dev/null +++ b/src/libunixonacid/unixmessage_drop.c @@ -0,0 +1,13 @@ +/* ISC license. */ + +#include <errno.h> +#include <skalibs/djbunix.h> +#include <skalibs/unixmessage.h> + +void unixmessage_drop (unixmessage_t const *m) +{ + int e = errno ; + register unsigned int i = 0 ; + for (; i < m->nfds ; i++) fd_close(m->fds[i]) ; + errno = e ; +} |