pthread_atfork()

bridged with qdn.public.qnxrtp.os
Post Reply
Jitendra Sasmal

pthread_atfork()

Post by Jitendra Sasmal » Tue Dec 02, 2003 10:50 am

Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?

Thanking you in advance.

With Regards
Jitendra Sasmal

David Gibbs

Re: pthread_atfork()

Post by David Gibbs » Tue Dec 02, 2003 3:23 pm

Jitendra Sasmal <sasmal_jk@rediffmail.com> wrote:
Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?
Since fork() is only supported in a single-threaded application, you
generally don't need pthread_atfork().

What are you trying to accomplish?

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Jitendra Sasmal

Re: pthread_atfork()

Post by Jitendra Sasmal » Wed Dec 03, 2003 4:11 am

Thank you very much !

Actually,after going through the documentation of pthread_atfork(),I was
trying to create a deadlock situation and to solve it using
pthread_atfork().
All this is for my information only.

With Regards
Jitendra Sasmal

David Gibbs wrote:
Jitendra Sasmal <sasmal_jk@rediffmail.com> wrote:

Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?

Since fork() is only supported in a single-threaded application, you
generally don't need pthread_atfork().

What are you trying to accomplish?

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Bill Caroselli

Re: pthread_atfork()

Post by Bill Caroselli » Wed Dec 03, 2003 2:25 pm

David Gibbs <dagibbs@qnx.com> wrote:
DG > Jitendra Sasmal <sasmal_jk@rediffmail.com> wrote:
Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?
DG > Since fork() is only supported in a single-threaded application, you
DG > generally don't need pthread_atfork().

I would suggest that the document page for pthread_atfork() be amended
to reflect the fact that this function can not actually be used in a
multi-threaded QNX6 system.

David Gibbs

Re: pthread_atfork()

Post by David Gibbs » Wed Dec 03, 2003 4:17 pm

Bill Caroselli <qtps@earthlink.net> wrote:
David Gibbs <dagibbs@qnx.com> wrote:
DG > Jitendra Sasmal <sasmal_jk@rediffmail.com> wrote:

Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?

DG > Since fork() is only supported in a single-threaded application, you
DG > generally don't need pthread_atfork().

I would suggest that the document page for pthread_atfork() be amended
to reflect the fact that this function can not actually be used in a
multi-threaded QNX6 system.
But pthread_atfork() can be used... and, I'm pretty sure will cause the
appropriate handlers to be called.

-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Colin Burgess

Re: pthread_atfork()

Post by Colin Burgess » Tue Jan 06, 2004 2:03 pm

David Gibbs <dagibbs@qnx.com> wrote:
Bill Caroselli <qtps@earthlink.net> wrote:
David Gibbs <dagibbs@qnx.com> wrote:
DG > Jitendra Sasmal <sasmal_jk@rediffmail.com> wrote:

Hi,
How to use pthread_atfork() in qnx as fork() is supported only in single
threaded application in qnx ?

DG > Since fork() is only supported in a single-threaded application, you
DG > generally don't need pthread_atfork().

I would suggest that the document page for pthread_atfork() be amended
to reflect the fact that this function can not actually be used in a
multi-threaded QNX6 system.

But pthread_atfork() can be used... and, I'm pretty sure will cause the
appropriate handlers to be called.
Yes, but fork() itself will fail... :v)
-David
--
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.
--
cburgess@qnx.com

Post Reply

Return to “qdn.public.qnxrtp.os”