chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: replace close_nointr_nofail() by a more useful safe_close()
[elogind.git]
/
src
/
initctl
/
initctl.c
diff --git
a/src/initctl/initctl.c
b/src/initctl/initctl.c
index 468df35bac9eef2920a29715324f87ef002f5270..f9613ea3b1fe282ab2f1f67e85cea28b564d15fc 100644
(file)
--- a/
src/initctl/initctl.c
+++ b/
src/initctl/initctl.c
@@
-245,7
+245,7
@@
static void fifo_free(Fifo *f) {
if (f->server)
epoll_ctl(f->server->epoll_fd, EPOLL_CTL_DEL, f->fd, NULL);
if (f->server)
epoll_ctl(f->server->epoll_fd, EPOLL_CTL_DEL, f->fd, NULL);
-
close_nointr_nofail
(f->fd);
+
safe_close
(f->fd);
}
free(f);
}
free(f);
@@
-257,8
+257,7
@@
static void server_done(Server *s) {
while (s->fifos)
fifo_free(s->fifos);
while (s->fifos)
fifo_free(s->fifos);
- if (s->epoll_fd >= 0)
- close_nointr_nofail(s->epoll_fd);
+ safe_close(s->epoll_fd);
if (s->bus) {
sd_bus_flush(s->bus);
if (s->bus) {
sd_bus_flush(s->bus);