http://bugzilla.moblin.org/show_bug.cgi?id=7555
pohly <patrick.ohly(a)intel.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|syncevolution(a)lists.intel.c |patrick.ohly(a)intel.com
|om |
--- Comment #8 from pohly <patrick.ohly(a)intel.com> 2009-11-06 06:44:36 ---
(In reply to comment #7)
(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;
+ }
What about the case that we are in DBusServer::run() and outside of
SyncContext::doSync()? In that case the active signal handler is the niam()
function in syncevo-dbus-server. It doesn't set SyncContext::getSuspendFlags().
There's another problem related to this: Session::abort/suspend() do not tell
the DBusTransportAgent to return control. Because of that, the user cannot
abort a session when no messages are coming in. The timeout mechanism would
help, but isn't implemented yet, so abort() really has no effect at all.
Are you done with the code? I'm working on these other aspects of the code at
the moment, so I should take over and try fix these problems together.
--
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.