1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 23:21:22 +03:00
systemd/src
Franck Bui f75f613d25 core: reduce the number of stalled PIDs from the watched processes list when possible
Some PIDs can remain in the watched list even though their processes have
exited since a long time. It can easily happen if the main process of a forking
service manages to spawn a child before the control process exits for example.

However when a pid is about to be mapped to a unit by calling unit_watch_pid(),
the caller usually knows if the pid should belong to this unit exclusively: if
we just forked() off a child, then we can be sure that its PID is otherwise
unused. In this case we take this opportunity to remove any stalled PIDs from
the watched process list.

If we learnt about a PID in any other form (for example via PID file, via
searching, MAINPID= and so on), then we can't assume anything.
2019-03-20 10:51:49 +01:00
..
ac-power coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
activate Handle or voidify all calls to close_all_fds() 2019-03-15 15:46:41 +01:00
analyze analyze: reword explanation in critical-chain header 2019-03-15 10:17:46 +01:00
ask-password coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
backlight backlight: handle loading truncated file 2019-02-02 16:25:32 +02:00
basic process-util: introduce pid_is_my_child() helper 2019-03-20 10:51:49 +01:00
binfmt coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
boot Merge pull request #11971 from keszybz/kernel-install-directory 2019-03-14 10:51:55 +01:00
busctl util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
cgls systemd-cgls: typo error in help command 2019-03-19 10:27:28 +01:00
cgroups-agent
cgtop util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
core core: reduce the number of stalled PIDs from the watched processes list when possible 2019-03-20 10:51:49 +01:00
coredump util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
cryptsetup util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
debug-generator generators: define custom main func definer and use it where applicable 2018-12-12 21:58:00 +01:00
delta util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
detect-virt coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
dissect coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
environment-d-generator environment-d-generator: do not include /lib/environment.d in the list 2019-02-18 10:29:33 +01:00
escape coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
firstboot util: split out kbd related stuff 2019-03-14 13:25:51 +01:00
fsck fsck: use symbolic names where we have them 2019-01-07 17:50:39 +01:00
fstab-generator fstab-generator: do not print double header 2019-03-15 08:04:54 +01:00
fuzz fuzz-calendarspec: actually run the second part of the fuzzer 2019-03-16 18:13:17 +01:00
getty-generator getty-generator: use the new main function definer 2018-12-12 21:58:00 +01:00
gpt-auto-generator Merge pull request #11243 from poettering/nspawn-root-overlay 2019-03-01 16:08:55 +01:00
hibernate-resume coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
hostname util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
hwdb
id128 id128: no command accepts additional arguments 2019-03-15 18:53:23 +09:00
import import: do not try to set selinux related attributes if selinux is disabled 2019-03-11 10:59:13 +01:00
initctl util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
journal journalctl: support -b all to negate effect of -b 2019-03-19 10:48:26 +01:00
journal-remote journal-remote: do not request Content-Length if Transfer-Encoding is chunked 2019-03-11 13:52:10 +01:00
kernel-install kernel-install: create the entry directory only if $BOOT/$MACHINE_ID exists 2019-03-12 09:45:16 +01:00
libsystemd tree-wide: use ERRNO_IS_DISCONNECT() at more places 2019-03-19 15:41:30 +01:00
libsystemd-network util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
libudev util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
locale util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
login tree-wide: fix false search hits with ppp (typos) 2019-03-18 14:25:56 +01:00
machine util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
machine-id-setup coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
modules-load
mount shared: split out code to wait for jobs to complet into its own source file 2019-03-13 17:39:24 +01:00
network Merge pull request #11975 from keszybz/fuzzer-fixes-n 2019-03-15 17:34:37 +01:00
notify coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
nspawn tree-wide: fix false search hits with ppp (typos) 2019-03-18 14:25:56 +01:00
nss-myhostname util: split out errno related stuff 2019-03-14 13:25:51 +01:00
nss-mymachines util: split out errno related stuff 2019-03-14 13:25:51 +01:00
nss-resolve util: split out errno related stuff 2019-03-14 13:25:51 +01:00
nss-systemd nss: unportect errno before writing to NSS' *errnop 2019-02-08 10:34:47 +01:00
partition makefs: correct child process name 2018-12-01 12:50:45 +01:00
path coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
portable util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
quotacheck tree-wide: use FORK_RLIMIT_NOFILE_SAFE wherever possible 2018-12-01 12:50:45 +01:00
random-seed random-seed: don't use "label" version of mkdir_parents() 2019-03-07 15:10:06 +01:00
rc-local-generator generators: define custom main func definer and use it where applicable 2018-12-12 21:58:00 +01:00
remount-fs remount-fs: split out common pattern out to a function 2019-01-03 15:29:53 +01:00
reply-password util: move some raw memory functions from string-util.h → memory-util.h 2019-03-14 13:25:51 +01:00
resolve util: move ERRNO_IS_xyz macros to errno-util.h 2019-03-19 15:29:44 +01:00
rfkill Detect file truncation earlier in a few places 2019-02-02 16:25:32 +02:00
run shared: split out code to wait for jobs to complet into its own source file 2019-03-13 17:39:24 +01:00
run-generator generators: define custom main func definer and use it where applicable 2018-12-12 21:58:00 +01:00
shared seccomp: allow shmat to be a separate syscall on architectures which use a multiplexer 2019-03-15 15:46:41 +01:00
shutdown shutdown: rearrange shutdown sources in source tree 2019-03-05 12:21:17 +01:00
sleep core: Allow to configure execute_directories execution behavior 2019-02-18 16:16:02 +01:00
socket-proxy tree-wide: use ERRNO_IS_DISCONNECT() at more places 2019-03-19 15:41:30 +01:00
stdio-bridge stdio-bridge: slightly optimize formatting of structure 2019-03-19 15:29:44 +01:00
sulogin-shell tree-wide: use FORK_RLIMIT_NOFILE_SAFE wherever possible 2018-12-01 12:50:45 +01:00
sysctl sysctl: Don't pass null directive argument to '%s' 2018-12-16 21:01:39 -08:00
system-update-generator system-update-generator: use the new main function definer 2018-12-12 21:58:00 +01:00
systemctl bus-unit-util: split out code that shows a unit's process tree 2019-03-13 17:41:41 +01:00
systemd networkd: Introduce l2tp tunnel 2019-03-14 10:57:41 +09:00
sysusers Merge pull request #10920 from yuwata/hashmap-destructor 2018-12-03 17:59:44 +01:00
sysv-generator generators: define custom main func definer and use it where applicable 2018-12-12 21:58:00 +01:00
test core: reduce the number of stalled PIDs from the watched processes list when possible 2019-03-20 10:51:49 +01:00
time-wait-sync time-wait: define main through macro 2018-11-23 06:22:30 +09:00
timedate util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
timesync timesyncd: Improve sync log message. Fixes #11548. 2019-01-24 23:52:24 +01:00
tmpfiles util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
tty-ask-password-agent util: split out plymouth related stuff 2019-03-14 13:25:51 +01:00
udev Merge pull request #11975 from keszybz/fuzzer-fixes-n 2019-03-15 17:34:37 +01:00
update-done update-done: quit earlier on failure 2018-11-23 06:22:30 +09:00
update-utmp update-utmp: use _cleanup_ attribute to finalize process 2018-11-23 06:22:30 +09:00
user-sessions tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
vconsole vconsole-setup: fonts copy will fail if the current terminal is in graphical mode 2018-12-13 08:30:20 +01:00
veritysetup generators: define custom main func definer and use it where applicable 2018-12-12 21:58:00 +01:00
version meson: make version a dependency and use it in libbasic 2019-01-22 14:39:38 +01:00
volatile-root volatile-root: export original root 2019-03-01 14:11:07 +01:00