[Spice-devel] [spice-xpi PATCH 3/3] logging: add logging of spice-client command line and pid (#753155)
Uri Lublin
uril at redhat.com
Sun Jan 1 04:19:29 PST 2012
spice-client pid was already logged, by both parent and child (value 0).
It was moved to only be logged in the parent (spice-xpi).
---
SpiceXPI/src/plugin/plugin.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index a48c94f..35c28f0 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -578,13 +578,14 @@ void nsPluginInstance::Connect()
}
pid_t child = fork();
- LOG_DEBUG("child pid: " << child);
if (child == 0)
{
+ LOG_DEBUG("Running /usr/libexec/spice-xpi-client");
execl("/usr/libexec/spice-xpi-client", "/usr/libexec/spice-xpi-client", NULL);
LOG_ERROR("ERROR failed to run spice-xpi-client");
// TODO: temporary fallback for backward compatibility
+ LOG_DEBUG("Running /usr/bin/spicec --controller");
execl("/usr/bin/spicec", "/usr/bin/spicec", "--controller", NULL);
LOG_ERROR("ERROR failed to run spicec fallback");
@@ -592,6 +593,7 @@ void nsPluginInstance::Connect()
}
else
{
+ LOG_INFO("spice-client pid: " << child);
m_external_controller.SetFilename(socket_file);
if (m_external_controller.Connect(10) != 0)
--
1.7.1
More information about the Spice-devel
mailing list