mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
logger,initctl: use global exit timeout
This commit is contained in:
parent
7f434cf4c9
commit
ef9eb0a897
@ -27,6 +27,8 @@
|
||||
#define DEFAULT_TIMEOUT_USEC (3*USEC_PER_MINUTE)
|
||||
#define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
|
||||
|
||||
#define DEFAULT_EXIT_USEC (5*USEC_PER_MINUTE)
|
||||
|
||||
#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
|
||||
|
||||
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
|
||||
|
@ -42,9 +42,10 @@
|
||||
#include "special.h"
|
||||
#include "sd-daemon.h"
|
||||
#include "dbus-common.h"
|
||||
#include "def.h"
|
||||
|
||||
#define SERVER_FD_MAX 16
|
||||
#define TIMEOUT ((int) (10*MSEC_PER_SEC))
|
||||
#define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC))
|
||||
|
||||
typedef struct Fifo Fifo;
|
||||
|
||||
@ -388,7 +389,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if ((k = epoll_wait(server.epoll_fd,
|
||||
&event, 1,
|
||||
TIMEOUT)) < 0) {
|
||||
TIMEOUT_MSEC)) < 0) {
|
||||
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
@ -37,10 +37,11 @@
|
||||
#include "list.h"
|
||||
#include "sd-daemon.h"
|
||||
#include "tcpwrap.h"
|
||||
#include "def.h"
|
||||
|
||||
#define STREAMS_MAX 4096
|
||||
#define SERVER_FD_MAX 16
|
||||
#define TIMEOUT ((int) (5*60*MSEC_PER_SEC))
|
||||
#define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC))
|
||||
|
||||
typedef struct Stream Stream;
|
||||
|
||||
@ -661,7 +662,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if ((k = epoll_wait(server.epoll_fd,
|
||||
&event, 1,
|
||||
server.n_streams <= 0 ? TIMEOUT : -1)) < 0) {
|
||||
server.n_streams <= 0 ? TIMEOUT_MSEC : -1)) < 0) {
|
||||
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user