[systemd-devel] 回复: 回复: [systemd-de vel] systemctl can't execute stop actually,whenservice is started by other way

清辰 624001899 at qq.com
Fri Oct 27 09:53:24 UTC 2017


Hi, 


Where is the 'service xxx status' result stored? Or can I change the service status manually, when start / stop the service outside of systemd.


Thank you.




------------------ Original ------------------
From: "Lennart Poettering"<lennart at poettering.net>; 
Date: 2017年6月29日(星期四) 下午4:29
To: "Oliver Neukum"<oneukum at suse.com>; 
Cc: "清辰"<624001899 at qq.com>; "systemd-devel"<systemd-devel at lists.freedesktop.org>; 
Subject: Re: [systemd-devel] 回复: 回复: [systemd-de vel] systemctl can't execute stop actually,whenservice is started by other way



On Thu, 29.06.17 10:05, Oliver Neukum (oneukum at suse.com) wrote:

> Am Mittwoch, den 28.06.2017, 13:29 +0200 schrieb Lennart Poettering:
> > Well, it's a service manager. As such it keeps track of services,
> > knows when they are started and when they aren't. Why would it stop
> > services that aren't started?
> 
> Because you command it to do so.

Because things are technically designed that way. When systemd manages
services it does so ensuring it will get SIGCHLD events for them. it
will also run them in a cgroup, so that it can monitor its lifetime by
enumerating the cgroup's contents, and getting events from it.

Now, if you start stuff outside of systemd nothing of that is
available, so systemd wouldn#t know that is running, and it
couldn't properly stop anything because it can't get ahold of the
processes to terminate.

Lennart

-- 
Lennart Poettering, Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20171027/9d5a983e/attachment.html>


More information about the systemd-devel mailing list