chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
quota: do not pull in quota tools for mounts that do not originate in neither /etc...
[elogind.git]
/
src
/
kmsg-syslogd.c
diff --git
a/src/kmsg-syslogd.c
b/src/kmsg-syslogd.c
index e23c9d38626d5ce1f885a60af72c017840e6b277..c78011fe226d56cf06e1a067646358d27f4a55b4 100644
(file)
--- a/
src/kmsg-syslogd.c
+++ b/
src/kmsg-syslogd.c
@@
-39,7
+39,6
@@
#include "fdset.h"
#define SERVER_FD_MAX 16
#include "fdset.h"
#define SERVER_FD_MAX 16
-#define TIMEOUT ((int) (5*60*MSEC_PER_SEC))
typedef struct Stream Stream;
typedef struct Stream Stream;
@@
-355,7
+354,9
@@
static int write_message(Server *s, const char *buf, struct ucred *ucred) {
/* Then, add process if set */
if (read_process(&buf, &iovec[i]) > 0)
i++;
/* Then, add process if set */
if (read_process(&buf, &iovec[i]) > 0)
i++;
- else if (ucred && get_process_name(ucred->pid, &process) >= 0)
+ else if (ucred &&
+ ucred->pid > 0 &&
+ get_process_name(ucred->pid, &process) >= 0)
IOVEC_SET_STRING(iovec[i++], process);
/* Skip the stored PID if we have a better one */
IOVEC_SET_STRING(iovec[i++], process);
/* Skip the stored PID if we have a better one */
@@
-512,7
+513,7
@@
int main(int argc, char *argv[]) {
struct epoll_event event;
int k;
struct epoll_event event;
int k;
- if ((k = epoll_wait(server.epoll_fd, &event, 1,
TIMEOUT
)) < 0) {
+ if ((k = epoll_wait(server.epoll_fd, &event, 1,
-1
)) < 0) {
if (errno == EINTR)
continue;
if (errno == EINTR)
continue;