When we added the LXC driver, it originally needed to respond to signals. We removed that need a while ago, but left the infrastructure around. This patch removes the driver calls relating to signal progation, since they're unneccessary and we shouldn't follow this approach again in the future, because all drivers need to survive libvirtd restarts, which means they cannot rely in having signals from child processes. qemud/qemud.c | 3 +-- src/driver.h | 6 +----- src/internal.h | 2 -- src/libvirt.c | 10 ---------- src/network_driver.c | 1 - 5 files changed, 2 insertions(+), 20 deletions(-) Daniel diff -r dbe9394acdf8 qemud/qemud.c --- a/qemud/qemud.c Wed Oct 29 15:23:01 2008 +0000 +++ b/qemud/qemud.c Wed Oct 29 15:24:01 2008 +0000 @@ -262,9 +262,8 @@ break; default: - qemudLog(QEMUD_INFO, _("Received signal %d, dispatching to drivers"), + qemudLog(QEMUD_INFO, _("Received unexpected signal %d"), siginfo.si_signo); - virStateSigDispatcher(&siginfo); break; } diff -r dbe9394acdf8 src/driver.h --- a/src/driver.h Wed Oct 29 15:23:01 2008 +0000 +++ b/src/driver.h Wed Oct 29 15:24:01 2008 +0000 @@ -10,8 +10,6 @@ #include "libvirt/virterror.h" #include <libxml/uri.h> - -#include <signal.h> /* * List of registered drivers numbers @@ -595,12 +593,11 @@ virDrvStorageVolGetPath volGetPath; }; +#ifdef WITH_LIBVIRTD typedef int (*virDrvStateInitialize) (void); typedef int (*virDrvStateCleanup) (void); typedef int (*virDrvStateReload) (void); typedef int (*virDrvStateActive) (void); -#ifdef WITH_LIBVIRTD -typedef int (*virDrvSigHandler) (siginfo_t *siginfo); typedef struct _virStateDriver virStateDriver; typedef virStateDriver *virStateDriverPtr; @@ -610,7 +607,6 @@ virDrvStateCleanup cleanup; virDrvStateReload reload; virDrvStateActive active; - virDrvSigHandler sigHandler; }; #endif diff -r dbe9394acdf8 src/internal.h --- a/src/internal.h Wed Oct 29 15:23:01 2008 +0000 +++ b/src/internal.h Wed Oct 29 15:24:01 2008 +0000 @@ -333,12 +333,10 @@ int __virStateCleanup(void); int __virStateReload(void); int __virStateActive(void); -int __virStateSigDispatcher(siginfo_t *siginfo); #define virStateInitialize() __virStateInitialize() #define virStateCleanup() __virStateCleanup() #define virStateReload() __virStateReload() #define virStateActive() __virStateActive() -#define virStateSigDispatcher(s) __virStateSigDispatcher(s) #endif int __virDrvSupportsFeature (virConnectPtr conn, int feature); diff -r dbe9394acdf8 src/libvirt.c --- a/src/libvirt.c Wed Oct 29 15:23:01 2008 +0000 +++ b/src/libvirt.c Wed Oct 29 15:24:01 2008 +0000 @@ -625,16 +625,6 @@ return ret; } -int __virStateSigDispatcher(siginfo_t *siginfo) { - int i, ret = 0; - - for (i = 0 ; i < virStateDriverTabCount ; i++) { - if (virStateDriverTab[i]->sigHandler && - virStateDriverTab[i]->sigHandler(siginfo)) - ret = 1; - } - return ret; -} #endif diff -r dbe9394acdf8 src/network_driver.c --- a/src/network_driver.c Wed Oct 29 15:23:01 2008 +0000 +++ b/src/network_driver.c Wed Oct 29 15:24:01 2008 +0000 @@ -1144,7 +1144,6 @@ networkShutdown, networkReload, networkActive, - NULL }; int networkRegister(void) { -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list