Re: DBUS API to restart unit by sending sigkill/sighup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mo, 10.09.18 12:12, prashantkumar dhotre (prashantkumardhotre@xxxxxxxxx) wrote:

> Hi,
> Is there is dbus API for systemd to restart unit by sending sigkill /sighup
> ?
> https://www.freedesktop.org/wiki/Software/systemd/dbus/
> RestartUnit(in  s name, in  s mode, out o job);

RestartUnit() will stop a unit, and then start it again. Stopping the
unit takes place with the command ExecStop= or (if not specified or
processes remain after ExecStop=) with SIGTERM, followed by a timeout
and SIGKILL.

> My requirement is to have a way to restart unit by sending sigkill or
> sighup (user can specify ) also along with sigterm.

As Mantas mentioned SIGHUP is usually used for asynchronously
reloading service configuration, not for terminating them. That said,
shells tend to ignore SIGTERM and react to SIGHUP for shutdown
instead, which is why systemd exposes SendSIGHUP= to cover this case.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux