view src/lib/close-keep-errno.c @ 9451:9fff30644260 HEAD

istream-concat: Fixed a lot of bugs.
author Timo Sirainen <tss@iki.fi>
date Mon, 26 Oct 2009 17:06:57 -0400
parents b9faf4db2a9f
children 00cd9aacd03c
line wrap: on
line source

/* Copyright (c) 2006-2009 Dovecot authors, see the included COPYING file */

#include "lib.h"
#include "close-keep-errno.h"

#include <unistd.h>

void close_keep_errno(int fd)
{
	int old_errno = errno;
	(void)close(fd);
	errno = old_errno;
}