]> git.proxmox.com Git - systemd.git/blame - src/basic/def.h
bump version to 252.11-pve1
[systemd.git] / src / basic / def.h
CommitLineData
a032b68d 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
663996b3
MS
2#pragma once
3
663996b3
MS
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
086111aa
LB
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
60f067b4
JS
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)
663996b3 20
db2df898
MP
21/* The default value for the net.unix.max_dgram_qlen sysctl */
22#define DEFAULT_UNIX_MAX_DGRAM_QLEN 512UL
23
663996b3 24#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
14228c0d
MB
25#define SIGNALS_IGNORE SIGPIPE
26
e735f4d4
MP
27#define NOTIFY_FD_MAX 768
28#define NOTIFY_BUFFER_MAX PIPE_BUF
db2df898 29
f5e65279 30#if HAVE_SPLIT_USR
b012e921
MB
31# define _CONF_PATHS_SPLIT_USR_NULSTR(n) "/lib/" n "\0"
32# define _CONF_PATHS_SPLIT_USR(n) , "/lib/" n
db2df898 33#else
b012e921 34# define _CONF_PATHS_SPLIT_USR_NULSTR(n)
2897b343 35# define _CONF_PATHS_SPLIT_USR(n)
db2df898
MP
36#endif
37
38/* Return a nulstr for a standard cascade of configuration paths,
8a584da2 39 * suitable to pass to conf_files_list_nulstr() or config_parse_many_nulstr()
db2df898
MP
40 * to implement drop-in directories for extending configuration
41 * files. */
2897b343
MP
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" \
b012e921
MB
47 _CONF_PATHS_SPLIT_USR_NULSTR(n)
48
bb4f798a
MB
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
b012e921 62#define CONF_PATHS_STRV(n) \
bb4f798a 63 STRV_MAKE(CONF_PATHS(n))
f5e65279 64
f5caa8fa 65/* The limit for PID 1 itself (which is not inherited to children) */
6e866b33 66#define HIGH_RLIMIT_MEMLOCK (1024ULL*1024ULL*64ULL)
e1f67bc7 67
f5caa8fa
MB
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
e1f67bc7
MB
72#define PLYMOUTH_SOCKET { \
73 .un.sun_family = AF_UNIX, \
74 .un.sun_path = "\0/org/freedesktop/plymouthd", \
75 }
a032b68d 76
ea0999c9
MB
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"
8f232108
MB
81
82#define KERNEL_BASELINE_VERSION "4.15"