You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Francois Mireaux (JIRA)" <ji...@apache.org> on 2009/11/05 15:30:37 UTC
[jira] Created: (AXIS2C-1411) thread_unix and thread_windows
inconsistency as for axutil_thread_exit
thread_unix and thread_windows inconsistency as for axutil_thread_exit
----------------------------------------------------------------------
Key: AXIS2C-1411
URL: https://issues.apache.org/jira/browse/AXIS2C-1411
Project: Axis2-C
Issue Type: Bug
Components: util
Environment: Unix
Reporter: Francois Mireaux
In thread_unix.c, axutil_thread_exit :
- sleep until thread is detached (try_exit is only set to true by axutil_thread_detach)
- call pthread_kill with 0 as second parameter which has no effect on thread (only test possible errors)
- call axutil_thread_join which doesn't work on detached thread but return code isn't tested
In thread_windows.c, axutil_thread_exit simply call TerminateThread which kills the thread (not cleany by the way) before calling axutil_thread_join (try_exit is not used).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AXIS2C-1411) thread_unix and thread_windows
inconsistency as for axutil_thread_exit
Posted by "Francois Mireaux (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2C-1411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francois Mireaux updated AXIS2C-1411:
-------------------------------------
Attachment: util.patch
Here is a patch for thread_unix.c to make it work like Windows version (using pthread_cancel instead of pthread_kill) and a new test program test_thread_exit.
But axutil_thread_exit isn't a safe function as a foreign thread can't exit cleanly neither under Windows nor under Unix.
> thread_unix and thread_windows inconsistency as for axutil_thread_exit
> ----------------------------------------------------------------------
>
> Key: AXIS2C-1411
> URL: https://issues.apache.org/jira/browse/AXIS2C-1411
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Environment: Unix
> Reporter: Francois Mireaux
> Attachments: util.patch
>
>
> In thread_unix.c, axutil_thread_exit :
> - sleep until thread is detached (try_exit is only set to true by axutil_thread_detach)
> - call pthread_kill with 0 as second parameter which has no effect on thread (only test possible errors)
> - call axutil_thread_join which doesn't work on detached thread but return code isn't tested
> In thread_windows.c, axutil_thread_exit simply call TerminateThread which kills the thread (not cleany by the way) before calling axutil_thread_join (try_exit is not used).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.