[libvirt] [PATCH v3 1/2] process: wait longer on kill per assigned Hostdev

Bjoern Walk bwalk at linux.ibm.com
Tue Aug 14 10:12:57 UTC 2018


Christian Ehrhardt <christian.ehrhardt at canonical.com> [2018-08-14, 11:27AM +0200]:
> diff --git a/src/util/virprocess.c b/src/util/virprocess.c
> index ecea27a2d4..46360cc051 100644
> --- a/src/util/virprocess.c
> +++ b/src/util/virprocess.c
> @@ -341,15 +341,19 @@ int virProcessKill(pid_t pid, int sig)
>   * Returns 0 if it was killed gracefully, 1 if it
>   * was killed forcibly, -1 if it is still alive,
>   * or another error occurred.
> + *
> + * Callers can proide an extra delay to wait longer
> + * than the default.
>   */
>  int
> -virProcessKillPainfully(pid_t pid, bool force)
> +virProcessKillPainfullyDelay(pid_t pid, bool force, unsigned int extradelay)
>  {
>      size_t i;
>      int ret = -1;
> +    unsigned int delay = 75 + (extradelay*5);
>      const char *signame = "TERM";
>  
> -    VIR_DEBUG("vpid=%lld force=%d", (long long)pid, force);
> +    VIR_DEBUG("vpid=%lld force=%d delay=%u", (long long)pid, force, pid);
                                                                       ^
This probably should be delay, right?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180814/d011db5b/attachment-0001.sig>


More information about the libvir-list mailing list