[Spice-commits] SpiceXPI/src

Peter Hatina phatina at kemper.freedesktop.org
Thu May 3 03:50:05 PDT 2012


 SpiceXPI/src/plugin/plugin.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 459a1ab407cf42e3612e200ad2f83230f1bb6e96
Author: Peter Hatina <phatina at redhat.com>
Date:   Thu May 3 12:51:03 2012 +0200

    fix signal handling when disconnecting

diff --git a/SpiceXPI/src/plugin/plugin.cpp b/SpiceXPI/src/plugin/plugin.cpp
index d12d02c..906c985 100644
--- a/SpiceXPI/src/plugin/plugin.cpp
+++ b/SpiceXPI/src/plugin/plugin.cpp
@@ -598,6 +598,8 @@ void nsPluginInstance::Connect()
     m_pid_controller = fork();
     if (m_pid_controller == 0)
     {
+        setpgrp();
+
         close(pipe_fds[1]);
         pipe_fds[1] = -1;
 
@@ -710,7 +712,7 @@ void nsPluginInstance::Show()
 void nsPluginInstance::Disconnect()
 {
     if (m_pid_controller > 0)
-        kill(m_pid_controller, SIGTERM);
+        kill(-m_pid_controller, SIGTERM);
 }
 
 void nsPluginInstance::ConnectedStatus(PRInt32 *retval)


More information about the Spice-commits mailing list