chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove src/bootchart
[elogind.git]
/
src
/
journal
/
journald.c
diff --git
a/src/journal/journald.c
b/src/journal/journald.c
index 886ac92a79c9b0882a1c4bb2e1166660e3b99b4c..28a423326e4b0cb6006795829879565822e44aa7 100644
(file)
--- a/
src/journal/journald.c
+++ b/
src/journal/journald.c
@@
-19,20
+19,18
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/epoll.h>
-#include <sys/socket.h>
-#include <errno.h>
#include <unistd.h>
#include <unistd.h>
-#include <systemd/sd-journal.h>
-#include <systemd/sd-messages.h>
-#include <systemd/sd-daemon.h>
+#include "systemd/sd-messages.h"
+#include "systemd/sd-daemon.h"
#include "journal-authenticate.h"
#include "journald-server.h"
#include "journald-kmsg.h"
#include "journald-syslog.h"
#include "journal-authenticate.h"
#include "journald-server.h"
#include "journald-kmsg.h"
#include "journald-syslog.h"
+#include "sigbus.h"
+
int main(int argc, char *argv[]) {
Server server;
int r;
int main(int argc, char *argv[]) {
Server server;
int r;
@@
-49,6
+47,8
@@
int main(int argc, char *argv[]) {
umask(0022);
umask(0022);
+ sigbus_install();
+
r = server_init(&server);
if (r < 0)
goto finish;
r = server_init(&server);
if (r < 0)
goto finish;
@@
-65,7
+65,7
@@
int main(int argc, char *argv[]) {
"STATUS=Processing requests...");
for (;;) {
"STATUS=Processing requests...");
for (;;) {
- usec_t t =
(usec_t) -1
, n;
+ usec_t t =
USEC_INFINITY
, n;
r = sd_event_get_state(server.event);
if (r < 0)
r = sd_event_get_state(server.event);
if (r < 0)
@@
-104,7
+104,7
@@
int main(int argc, char *argv[]) {
r = sd_event_run(server.event, t);
if (r < 0) {
r = sd_event_run(server.event, t);
if (r < 0) {
- log_error
("Failed to run event loop: %s", strerror(-r)
);
+ log_error
_errno(r, "Failed to run event loop: %m"
);
goto finish;
}
goto finish;
}
@@
-116,7
+116,9
@@
int main(int argc, char *argv[]) {
server_driver_message(&server, SD_MESSAGE_JOURNAL_STOP, "Journal stopped");
finish:
server_driver_message(&server, SD_MESSAGE_JOURNAL_STOP, "Journal stopped");
finish:
- sd_notify(false, "STATUS=Shutting down...");
+ sd_notify(false,
+ "STOPPING=1\n"
+ "STATUS=Shutting down...");
server_done(&server);
server_done(&server);