summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-11 20:13:44 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-11 20:55:09 +0100
commitf9a810bedacf1da7c505c1786a2416d592665926 (patch)
treee4fdb88684e2bacb4567228aabd3448d75fb3ce0 /src/journal/journald-server.h
parent419173e60a05424008fcd312f6df4b59b2ce8e62 (diff)
journald: port to sd-event and enable watchdog support
Diffstat (limited to 'src/journal/journald-server.h')
-rw-r--r--src/journal/journald-server.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
index db577b8913..2c3e2c239d 100644
--- a/src/journal/journald-server.h
+++ b/src/journal/journald-server.h
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include "sd-event.h"
#include "journal-file.h"
#include "hashmap.h"
#include "util.h"
@@ -54,13 +55,23 @@ typedef enum SplitMode {
typedef struct StdoutStream StdoutStream;
typedef struct Server {
- int epoll_fd;
- int signal_fd;
int syslog_fd;
int native_fd;
int stdout_fd;
int dev_kmsg_fd;
+ sd_event *event;
+
+ sd_event_source *syslog_event_source;
+ sd_event_source *native_event_source;
+ sd_event_source *stdout_event_source;
+ sd_event_source *dev_kmsg_event_source;
+ sd_event_source *sync_event_source;
+ sd_event_source *sigusr1_event_source;
+ sd_event_source *sigusr2_event_source;
+ sd_event_source *sigterm_event_source;
+ sd_event_source *sigint_event_source;
+
JournalFile *runtime_journal;
JournalFile *system_journal;
Hashmap *user_journals;
@@ -118,7 +129,6 @@ typedef struct Server {
struct udev *udev;
- int sync_timer_fd;
bool sync_scheduled;
} Server;
@@ -152,5 +162,5 @@ void server_vacuum(Server *s);
void server_rotate(Server *s);
int server_schedule_sync(Server *s, int priority);
int server_flush_to_var(Server *s);
-int process_event(Server *s, struct epoll_event *ev);
void server_maybe_append_tags(Server *s);
+int process_datagram(sd_event_source *es, int fd, uint32_t revents, void *userdata);