[systemd-devel] Wanted service in status deactivating

Liu, Shuang (ADITG/ESM) sliu at de.adit-jv.com
Tue Dec 18 12:04:08 UTC 2018


Hi,

What should happen if a wanted service in status deactivating (stop)?

For example, in the service A an ExecStop= is defined and takes 0.5s.
Then what should happen if a service B is started and A is wantedby B during the 0.5s.

Concrete scenario is:
A USB device has defined the udev rule SYSTEMD_WANTS=A.service and is bind to B.device.
It works normally as expected:
	When connect the device, the A.service is started.
	When disconnect, the A.service is stopped.

However, if quick disconnect/connect the device (<0.5s), A.service stay in stopped and will not be restarted.
Probably when connecting, the service is in deactivating and the Wants will be hence ignored.

Best regards

Shuang Liu


More information about the systemd-devel mailing list