To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=63473 Issue #:|63473 Summary:|Clean process termination Component:|udk Version:|680m159 Platform:|All URL:| OS/Version:|All Status:|NEW Status whiteboard:| Keywords:| Resolution:| Issue type:|ENHANCEMENT Priority:|P3 Subcomponent:|code Assigned to:|sb Reported by:|sb
------- Additional comments from [EMAIL PROTECTED] Wed Mar 22 02:09:22 -0800 2006 ------- Fixing issue 63397, I stumbled once again over problems of clean process termination. There, a unopkg process has a remote UNO connection open, releases all remote objects (which leads to async release calls in additional threads), calls exit from the main thread, which will forcefully terminate the additional threads (which, btw, still operate while the atexit handlers run, which was the problem in issue 63397). A cleaner scenario would be that a process (soffice, unopkg, uno, whatever) terminates once all threads have terminated. To do this, a program must not return from main or call exit, _exit, _Exit, but instead call pthread_exit or ExitThread (Windows) from the main thread before it reaches the end of main (remember to give all local vars of a C++ main a chance to be destroyed before the call to pthread_exit/ExitThread; that pthread_exit from main is ok is explicitly mentioned in Butenhof's book; that ExitThread from main is ok is alluded to on the corresponding msdn web page; it must still be checked whether exit is called implicitly once no more threads are there on Windows, as is the case for Posix). There are a few issues, however: 1 The vos OTimerManager thread never terminates. This should be replaced with some implementation that terminates the thread if it is not used. 2 The binary URP worker threads idle around for some time before they terminate, waiting for new work to come in. This causes a delay when terminating a process. For fixing issue 63397, changes were made to bridges/source/remote/context/context.cxx:1.6.20.1 l. 179 ff and cppu/source/uno/lbmap.cxx:1.23.28.1 l. 195 ff, allocating objects on the heap (and leaking them) instead of statically (and destroying them through atexit handlers). These two changes should be reverted once this issue is fixed. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
