enable _NTO_CHF_THREAD_DEATH channel flag thru name_attach

Hi,

How do I enable the channel flag _NTO_CHF_THREAD_DEATH on a channel that is created using the name_attach() call? When I tried calling name_detach() on a channel that is created by another thread I don’t get any pulse on MsgReceive(). But if I use ChannelCreate() and set the flag I do get the pulse.

In my prog I always get PULSE_CODE_COIDDEATH in my first thread :
typedef struct
{
pulse hdr;
int type;
char data [4096];
}
MESSAGE
;
MESSAGE
r_msg;
if (r_msg.hdr.code == _PULSE_CODE_DISCONNECT)
{
printf("-%s- RECEIVE _PULSE_CODE_DISCONNECT\n", ch_name);
return -1;
}