]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/service: make service_set_main_pidref consume pidref
authorMike Yuan <me@yhndnzj.com>
Fri, 5 Apr 2024 10:21:50 +0000 (18:21 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 5 Apr 2024 18:22:19 +0000 (02:22 +0800)
commitc603f523d0eb9594a19a4895e1abcc006a848f6e
treebb1dce6a5190775e1b6ca21dbc5f6a64eea103b5
parentc1e7f938ca21386522b21a3813bc3d39b5a034f8
core/service: make service_set_main_pidref consume pidref

Currently, the memory management of service_set_main_pidref
is a bit odd. Normally we either invalidate the original
resource on caller's side after the call succeeds, or
just pass the ownership wholly. But service_set_main_pidref
take a pointer, and calls pidref_done() internally.

Let's just make it consume the passed pidref. This is more
straightforward.
src/core/service.c