http://bugzilla.moblin.org/show_bug.cgi?id=7555
--- Comment #7 from yongsheng zhu <yongsheng.zhu(a)intel.com> 2009-11-06 06:03:03
---
(In reply to comment #6)
While testing with test-dbus.py I noticed that the server was not
shut down
reliably after running a sync. I think that was a timing issue: if the SIGTERM
arrived after running a sync and before returning into the syncevo-dbus-server
main loop, g_main_loop_quit() would be called outside of the loop, thus doing
nothing, so that the signal was ignored.
If loop is running, quit_loop won't do
anything about loop. I add below code
to check while in the DBusServer::run(). You can find them in the branch
'origin/yongsheng'.
--- a/src/syncevo-dbus-server.cpp
+++ b/src/syncevo-dbus-server.cpp
@@ -2561,12 +2561,6 @@ void DBusServer::run()
// running a sync and quitting; no active session, so quit
break;
}
+ /** check whether receiving CTRL-C/SIGINT/SIGTERM and aborting
syncevo-dbus-server */
+ SuspendFlags flags = SyncContext::getSuspendFlags();
+ if(flags.state == SuspendFlags::CLIENT_SUSPEND ||
+ flags.state == SuspendFlags::CLIENT_ABORT ) {
+ break;
+ }
--
Configure bugmail:
http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.