chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: small cleanup
[elogind.git]
/
src
/
journal
/
journal-send.c
diff --git
a/src/journal/journal-send.c
b/src/journal/journal-send.c
index ca9199f7187d79657c5c115c4b25758d1ebba340..d92e84baab5e2ad53e7df3b5744ded6ca557c6ef 100644
(file)
--- a/
src/journal/journal-send.c
+++ b/
src/journal/journal-send.c
@@
-66,7
+66,7
@@
retry:
fd_inc_sndbuf(fd, SNDBUF_SIZE);
if (!__sync_bool_compare_and_swap(&fd_plus_one, 0, fd+1)) {
fd_inc_sndbuf(fd, SNDBUF_SIZE);
if (!__sync_bool_compare_and_swap(&fd_plus_one, 0, fd+1)) {
-
close_nointr_nofail
(fd);
+
safe_close
(fd);
goto retry;
}
goto retry;
}
@@
-316,7
+316,7
@@
_public_ int sd_journal_sendv(const struct iovec *iov, int n) {
n = writev(buffer_fd, w, j);
if (n < 0) {
n = writev(buffer_fd, w, j);
if (n < 0) {
-
close_nointr_nofail
(buffer_fd);
+
safe_close
(buffer_fd);
return -errno;
}
return -errno;
}
@@
-336,7
+336,7
@@
_public_ int sd_journal_sendv(const struct iovec *iov, int n) {
mh.msg_controllen = cmsg->cmsg_len;
k = sendmsg(fd, &mh, MSG_NOSIGNAL);
mh.msg_controllen = cmsg->cmsg_len;
k = sendmsg(fd, &mh, MSG_NOSIGNAL);
-
close_nointr_nofail
(buffer_fd);
+
safe_close
(buffer_fd);
if (k < 0)
return -errno;
if (k < 0)
return -errno;
@@
-412,12
+412,12
@@
_public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
r = connect(fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
r = connect(fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
-
close_nointr_nofail
(fd);
+
safe_close
(fd);
return -errno;
}
if (shutdown(fd, SHUT_RD) < 0) {
return -errno;
}
if (shutdown(fd, SHUT_RD) < 0) {
-
close_nointr_nofail
(fd);
+
safe_close
(fd);
return -errno;
}
return -errno;
}
@@
-445,12
+445,12
@@
_public_ int sd_journal_stream_fd(const char *identifier, int priority, int leve
r = loop_write(fd, header, l, false);
if (r < 0) {
r = loop_write(fd, header, l, false);
if (r < 0) {
-
close_nointr_nofail
(fd);
+
safe_close
(fd);
return (int) r;
}
if ((size_t) r != l) {
return (int) r;
}
if ((size_t) r != l) {
-
close_nointr_nofail
(fd);
+
safe_close
(fd);
return -errno;
}
return -errno;
}