This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Syslink notify and cloning a process

Hi,

What happens to the Notify Callback function, if we clone the process after notify_registry call ? To be clear, I want to know which process's callback function will be called ? since after the clone, both the process will have the CallBack functions.

Here is what it looks like :

void notify_call_back()

{

}

int main()

{

Notify_registerEvent();

clone(thread_fuc1);

clone(thread_fuc2);

exit(0);

}

void thread_fuc1()

{

wait_for_event(); <--- is it this ?

}

void thread_fuc2()  

{

wait_for_event();    <---- Is it this ?

}

.I have similar design, but I am not receiving the notify events in neither cloned threads .

Thanks

Ashok

  • Hi Ashok,

    Syslink does not support clone().  We have never tested it with clone(), so we're not sure of the behavior.  When SysLink_setup() is called, a worker thread is started that waits for events and calls the appropriate callbacks.  I'm not sure whether the cloned process will have this thread.  Maybe you can try calling SysLink_setup() and Notify_registerEvent() from each of the cloned processes, and see if that works.

    Best regards,

        Janet