view src/lib/close-keep-errno.c @ 9595:166a188f9165 HEAD

mbox: Fields weren't being added to cache file during message saving.
author Timo Sirainen <tss@iki.fi>
date Fri, 30 Jul 2010 16:55:58 +0100
parents 00cd9aacd03c
children
line wrap: on
line source

/* Copyright (c) 2006-2010 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;
}