command line + local sync: fixed erroneous "Comparison impossible" output.

"Comparison impossible" was incorrectly printed after a successful
comparison on the target side of local sync.

The reason is that SIGCHLD SIG_IGN prevented reading the synccompare
return code. That code was probably added to prevent zombies when
syncevo-local-sync dies before it reads the return code of its
children.

Removing the SIGCHLD SIG_IGN fixes synccompare output issue.  A test
for the sync output will be committed next - the issue was found while
writing the test.

Code for handling zombies still needs to be added to all long-running
process (client-test, syncevo-dbus-server).
This commit is contained in:
Patrick Ohly 2012-04-30 10:13:05 +02:00
parent 4f720d1918
commit e71a1bbf20
1 changed files with 3 additions and 3 deletions

View File

@ -951,12 +951,12 @@ int LocalTransportMain(int argc, char **argv)
SyncContext::initMain("syncevo-local-sync");
// cannot be interrupted via signal directly,
// signals must be directed to parent
// SIGPIPE must be ignored, some system libs (glib GIO?) trigger
// it. SIGINT/TERM will be handled via SuspendFlags once the sync
// runs.
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_IGN;
sigaction(SIGCHLD, &sa, NULL);
sigaction(SIGPIPE, &sa, NULL);
try {