Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/lib/close-keep-errno.c @ 4011:323c09be5f00 HEAD
Moved dupliated close_save_errno() code to public close_keep_errno() function.
author | Timo Sirainen <timo.sirainen@movial.fi> |
---|---|
date | Tue, 14 Feb 2006 15:41:58 +0200 |
parents | |
children | 65c69a53a7be |
comparison
equal
deleted
inserted
replaced
4010:6519f3c7bd63 | 4011:323c09be5f00 |
---|---|
1 /* Copyright (c) 2006 Timo Sirainen */ | |
2 | |
3 #include "lib.h" | |
4 #include "close-keep-errno.h" | |
5 | |
6 #include <unistd.h> | |
7 | |
8 void close_keep_errno(int fd) | |
9 { | |
10 int old_errno = errno; | |
11 (void)close(fd); | |
12 errno = old_errno; | |
13 } |