diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-01 23:40:51 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-01 23:40:51 +0200 |
commit | 4d06d9307b536d5f9c10d9af4b1657157f81e568 (patch) | |
tree | 1c45825b604cda91ac4f6e2b212c0c4c127d9493 /nslcd/nslcd.c | |
parent | 3389cd8b880e1cc8a4c4cc40d3333ffce880edab (diff) |
add some comments describing some problems that this code may have
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@269 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/nslcd.c')
-rw-r--r-- | nslcd/nslcd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nslcd/nslcd.c b/nslcd/nslcd.c index 997a236..6dec34c 100644 --- a/nslcd/nslcd.c +++ b/nslcd/nslcd.c @@ -211,6 +211,7 @@ static RETSIGTYPE sigexit_handler(int signum) for (i=0;i<NUM_THREADS;i++) if (pthread_cancel(nslcd_threads[i])) { + /* TODO: figure out if we can actually log from within a signal handler */ log_log(LOG_WARNING,"failed to stop thread %d (ignored): %s",i,strerror(errno)); } } @@ -648,6 +649,10 @@ int main(int argc,char *argv[]) } /* wait for all threads to die */ + /* BUG: this causes problems if for some reason we want to exit but one + of our threads hangs (e.g. has one of the LDAP locks) + Other than that it may be a good idea to keep this thread more or less alive + to do general house keeping things (e.g. checking signals etc) */ for (i=0;i<NUM_THREADS;i++) { if (pthread_join(nslcd_threads[i],NULL)) |