[RFC 0/2] util: introduce timeout mode in virCommandRun/Async and virKModLoad

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

 



Hi, everyone!
It's possible that the running-time of a command is long than its caller
expected. Perhaps, it's useful to provide timeout mode for virCommandRun or
virCommandRunAsync + virCommandWait. And The caller can restrict the
running time of the command if necessary. I introduce a new function
virCommandSetTimeout for that.

And then, virKModLoad will get a default timeout of 3 seconds. I hope it
could solve the problem of "strange delay" as John mentioned.

Thanks!

Shi Lei (2):
  introduce timeout mode in virCommandRun/Async
  introduce timeout mode in virKModLoad

 docs/internals/command.html.in |  68 +++++++
 src/Makefile.am                |   4 +-
 src/libvirt_private.syms       |   2 +
 src/util/vircommand.c          | 110 ++++++++++-
 src/util/vircommand.h          |   4 +
 src/util/virkmod.c             |  43 ++++-
 src/util/virprocess.c          | 107 ++++++++---
 src/util/virprocess.h          |   4 +
 src/virt-command.conf          |  10 +
 tests/commandtest.c            | 411 ++++++++++++++++++++++++++++++++++++++---
 10 files changed, 706 insertions(+), 57 deletions(-)
 create mode 100644 src/virt-command.conf

-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux