]>
Commit | Line | Data |
---|---|---|
1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | |
2 | #pragma once | |
3 | ||
4 | #define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC) | |
5 | #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC) | |
6 | #define DEFAULT_CONFIRM_USEC (30*USEC_PER_SEC) | |
7 | ||
8 | /* We use an extra-long timeout for the reload. This is because a reload or reexec means generators are rerun | |
9 | * which are timed out after DEFAULT_TIMEOUT_USEC. Let's use twice that time here, so that the generators can | |
10 | * have their timeout, and for everything else there's the same time budget in place. */ | |
11 | #define DAEMON_RELOAD_TIMEOUT_SEC (DEFAULT_TIMEOUT_USEC * 2) | |
12 | ||
13 | #define DEFAULT_START_LIMIT_INTERVAL (10*USEC_PER_SEC) | |
14 | #define DEFAULT_START_LIMIT_BURST 5 | |
15 | ||
16 | /* The default time after which exit-on-idle services exit. This | |
17 | * should be kept lower than the watchdog timeout, because otherwise | |
18 | * the watchdog pings will keep the loop busy. */ | |
19 | #define DEFAULT_EXIT_USEC (30*USEC_PER_SEC) | |
20 | ||
21 | /* The default value for the net.unix.max_dgram_qlen sysctl */ | |
22 | #define DEFAULT_UNIX_MAX_DGRAM_QLEN 512UL | |
23 | ||
24 | #define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT | |
25 | #define SIGNALS_IGNORE SIGPIPE | |
26 | ||
27 | #define NOTIFY_FD_MAX 768 | |
28 | #define NOTIFY_BUFFER_MAX PIPE_BUF | |
29 | ||
30 | #if HAVE_SPLIT_USR | |
31 | # define _CONF_PATHS_SPLIT_USR_NULSTR(n) "/lib/" n "\0" | |
32 | # define _CONF_PATHS_SPLIT_USR(n) , "/lib/" n | |
33 | #else | |
34 | # define _CONF_PATHS_SPLIT_USR_NULSTR(n) | |
35 | # define _CONF_PATHS_SPLIT_USR(n) | |
36 | #endif | |
37 | ||
38 | /* Return a nulstr for a standard cascade of configuration paths, | |
39 | * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr() | |
40 | * to implement drop-in directories for extending configuration | |
41 | * files. */ | |
42 | #define CONF_PATHS_NULSTR(n) \ | |
43 | "/etc/" n "\0" \ | |
44 | "/run/" n "\0" \ | |
45 | "/usr/local/lib/" n "\0" \ | |
46 | "/usr/lib/" n "\0" \ | |
47 | _CONF_PATHS_SPLIT_USR_NULSTR(n) | |
48 | ||
49 | #define CONF_PATHS_USR(n) \ | |
50 | "/etc/" n, \ | |
51 | "/run/" n, \ | |
52 | "/usr/local/lib/" n, \ | |
53 | "/usr/lib/" n | |
54 | ||
55 | #define CONF_PATHS(n) \ | |
56 | CONF_PATHS_USR(n) \ | |
57 | _CONF_PATHS_SPLIT_USR(n) | |
58 | ||
59 | #define CONF_PATHS_USR_STRV(n) \ | |
60 | STRV_MAKE(CONF_PATHS_USR(n)) | |
61 | ||
62 | #define CONF_PATHS_STRV(n) \ | |
63 | STRV_MAKE(CONF_PATHS(n)) | |
64 | ||
65 | /* The limit for PID 1 itself (which is not inherited to children) */ | |
66 | #define HIGH_RLIMIT_MEMLOCK (1024ULL*1024ULL*64ULL) | |
67 | ||
68 | /* Since kernel 5.16 the kernel default limit was raised to 8M. Let's adjust things on old kernels too, and | |
69 | * in containers so that our children inherit that. */ | |
70 | #define DEFAULT_RLIMIT_MEMLOCK (1024ULL*1024ULL*8ULL) | |
71 | ||
72 | #define PLYMOUTH_SOCKET { \ | |
73 | .un.sun_family = AF_UNIX, \ | |
74 | .un.sun_path = "\0/org/freedesktop/plymouthd", \ | |
75 | } | |
76 | ||
77 | /* Path where PID1 listens for varlink subscriptions from systemd-oomd to notify of changes in ManagedOOM settings. */ | |
78 | #define VARLINK_ADDR_PATH_MANAGED_OOM_SYSTEM "/run/systemd/io.system.ManagedOOM" | |
79 | /* Path where systemd-oomd listens for varlink connections from user managers to report changes in ManagedOOM settings. */ | |
80 | #define VARLINK_ADDR_PATH_MANAGED_OOM_USER "/run/systemd/oom/io.system.ManagedOOM" | |
81 | ||
82 | #define KERNEL_BASELINE_VERSION "4.15" |