http://bugzilla.moblin.org/show_bug.cgi?id=7555
--- Comment #5 from yongsheng zhu <yongsheng.zhu(a)intel.com> 2009-11-03 00:17:23
---
(In reply to comment #4)
There are some more aspects to this:
- SIGINT/TERM should always terminate syncevo-dbus-server, regardless whether
a sync runs or not. The goal here is to be deterministic. IMHO this does
not work at the moment because the signal handler inside SyncContext
handles the signal and then only aborts the sync, but not the outer
event loop.
- The process should be terminated even when there are other sync requests
pending.
This is something which is hard to test manually. Therefore a test case as part
of test-dbus.py should be written which covers these situations.
so combining your
statements, I suggest below way to handle these signals:
1) If no session is running, terminate syncevo-dbus-server immediately when
receiving CTRL-C/SIGINT/SIGTERM.
2) If a sync runs, one 'CTRL-C'/SIGINT is to suspend and 2 'CTRL-C'/SIGINT
in 2
seconds or SIGTERM are to abort the sync immediately. After that,
syncevo-dbus-server checks whether receiving these signals because these
signals are caught by syncevolution core. If yes, terminate syncevo-dbus-server
immediately.
3) If suspend() or abort() is called by dbus client, only suspend/abort the
running sync, but do not terminate syncevo-dbus-server.
--
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.