diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-07-07 15:57:51 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2021-07-07 18:41:08 +0100 |
commit | 0c4d1e6d96a549054bfe0597d197f829838917f1 (patch) | |
tree | 03d26661dc8957516a70aa29607767126ea8d80f /NEWS | |
parent | 682047f834112f691716292eb5bd349e51bee3ef (diff) |
process-util: explicitly handle processes lacking parents in get_process_ppid()
Let's make sure we signal out-of-band via an error message if a process
doesn't have a parent process whose PID we could return. Otherwise we'll
too likely hide errors, as we return an invalid PID 0, which in other
contexts has special meaning (i.e. usually "myself").
Replaces: #20153
This is based on work by @dtardon, but goes a different route, by
ensuring we propagate a proper error in this case.
This modernizes the function in question a bit in other ways, i.e.
renames stuff and makes the return parameter optional.
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions