original code is valid
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7b295039 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7b295039 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7b295039 Branch: refs/heads/master Commit: 7b2950393bd81138c85f006a0bc82b20d0de6e95 Parents: 9f93e7d Author: SuJinpei <[email protected]> Authored: Tue Oct 24 09:18:59 2017 +0800 Committer: SuJinpei <[email protected]> Committed: Tue Oct 24 09:18:59 2017 +0800 ---------------------------------------------------------------------- core/conn/odb/src/odb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7b295039/core/conn/odb/src/odb.c ---------------------------------------------------------------------- diff --git a/core/conn/odb/src/odb.c b/core/conn/odb/src/odb.c index da88eec..e983be2 100755 --- a/core/conn/odb/src/odb.c +++ b/core/conn/odb/src/odb.c @@ -4159,7 +4159,7 @@ static void sigcatch(int sig) gclean(); } else { for ( i = 0 ; i < tn ; i++ ) { - if ( pthread_kill(thid[i], 0) ) { /* If this thread is alive... */ + if ( !pthread_kill(thid[i], 0) ) { /* If this thread is alive... */ if ( pthread_cancel(thid[i]) ) /* ... cancel it */ fprintf(stderr, "odb [sigcatch(%d)] - Error canceling thread %d: [%d] %s\n", __LINE__, i, errno, strerror(errno) );
