When threads are created in detached state, the resources allocated to these
threads will be released automatically/immediately once that thread exits.
However, in some calls to pthread_create in avd, eds, gld, immd, immnd, mqnd,
the argumen to set this option is passed as NULL.
This patch rightly passes the attribute PTHREAD_CREATE_DETACHED to the 
pthread_create call"



---

** [tickets:#287] Resource leak since DETACH option `&attr` is not passed to 
the pthread-create( ) call**

**Status:** fixed
**Created:** Tue May 21, 2013 07:29 AM UTC by Mathi Naickan
**Last Updated:** Wed Jul 03, 2013 01:41 PM UTC
**Owner:** nobody

The following services are setting for thread-DETACH option but the respective 
"&attr" is not passed to pthread_create() call. We have to correct this in 
OpenSAF.
avsv/avd/avd_imm.c: if (pthread_create(&thread, NULL, avd_imm_reinit_bg_thread, 
avd_cb) != 0) {
edsv/eds/eds_imm.c: if (pthread_create(&thread, NULL, 
_eds_imm_declare_implementer, cb) != 0) {
immsv/immd/immd_amf.c: if (pthread_create(&thread, NULL, amf_init_start, NULL) 
!= 0) {
immsv/immnd/immnd_amf.c: if (pthread_create(&thread, NULL, amf_init_start, cb) 
!= 0) {
mqsv/mqnd/mqnd_imm.c: if (pthread_create(&thread, NULL, 
_mqnd_imm_declare_implementer, cb) != 0) {
In GLD there is not explicit setting of DETACH, but it is required to set 
DETACH option for this one too.
glsv/gld/gld_imm.c: if (pthread_create(&thread, NULL, 
_gld_imm_declare_implementer, cb) != 0) { 


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to