add non-failing close() variant
This commit is contained in:
parent
4901f97278
commit
85f136b5d0
8
util.c
8
util.c
|
@ -97,6 +97,14 @@ int close_nointr(int fd) {
|
|||
}
|
||||
}
|
||||
|
||||
void close_nointr_nofail(int fd) {
|
||||
|
||||
/* like close_nointr() but cannot fail, and guarantees errno
|
||||
* is unchanged */
|
||||
|
||||
assert_se(close_nointr(fd) == 0);
|
||||
}
|
||||
|
||||
int parse_boolean(const char *v) {
|
||||
assert(v);
|
||||
|
||||
|
|
Loading…
Reference in New Issue