journald-stream.c | journald-stream.c | |||
---|---|---|---|---|
skipping to change at line 453 | skipping to change at line 453 | |||
s->stdout_fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOC K_NONBLOCK, 0); | s->stdout_fd = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOC K_NONBLOCK, 0); | |||
if (s->stdout_fd < 0) { | if (s->stdout_fd < 0) { | |||
log_error("socket() failed: %m"); | log_error("socket() failed: %m"); | |||
return -errno; | return -errno; | |||
} | } | |||
unlink(sa.un.sun_path); | unlink(sa.un.sun_path); | |||
r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_unio n, un.sun_path) + strlen(sa.un.sun_path)); | r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_unio n, un.sun_path) + strlen(sa.un.sun_path)); | |||
if (r < 0) { | if (r < 0) { | |||
log_error("bind() failed: %m"); | log_error("bind(%s) failed: %m", sa.un.sun_path); | |||
return -errno; | return -errno; | |||
} | } | |||
chmod(sa.un.sun_path, 0666); | chmod(sa.un.sun_path, 0666); | |||
if (listen(s->stdout_fd, SOMAXCONN) < 0) { | if (listen(s->stdout_fd, SOMAXCONN) < 0) { | |||
log_error("listen() failed: %m"); | log_error("listen(%s) failed: %m", sa.un.sun_path); | |||
return -errno; | return -errno; | |||
} | } | |||
} else | } else | |||
fd_nonblock(s->stdout_fd, 1); | fd_nonblock(s->stdout_fd, 1); | |||
r = sd_event_add_io(s->event, &s->stdout_event_source, s->stdout_fd , EPOLLIN, stdout_stream_new, s); | r = sd_event_add_io(s->event, &s->stdout_event_source, s->stdout_fd , EPOLLIN, stdout_stream_new, s); | |||
if (r < 0) { | if (r < 0) { | |||
log_error("Failed to add stdout server fd to event source: %s", strerror(-r)); | log_error("Failed to add stdout server fd to event source: %s", strerror(-r)); | |||
return r; | return r; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |