From: Paul Pluzhnikov <ppluzhnikov@earthlink.net>
Subject: Re: fork() problem
Date: Thu, 29 Aug 2002 04:04:17 GMT [thread overview]
Message-ID: <m3bs7m73wa.fsf@salmon.parasoft.com> (raw)
In-Reply-To: roma-48B9E8.03131729082002@news.gamma.ru
Roman Prokhorov <roma@stalker.gamma.ru> writes:
> I have a problem: Under Tru64 the fork() called from a thread freezes.
> This doesn't happen on the other Unixes I tried. See my code below, did
> I do anything wrong?
Yes.
Your question has been answered many times in comp.programming.threads.
Search groups.google.com for "thread fork async" ...
Here is one answer by Kaz Kylheku
Message-ID: <slrn8urucn.gqp.kaz@ashi.FootPrints.net>
Mind you, according to POSIX, if a threaded process forks a
child, that child can execute only async safe functions. It
can use exec() to load a new process image. Since fprintf()
is not async safe, calling it results in undefined behavior.
Cheers,
--
In order to understand recursion you must first understand recursion.
next prev parent reply other threads:[~2002-08-29 4:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-28 23:13 fork() problem Roman Prokhorov
2002-08-29 4:04 ` Paul Pluzhnikov [this message]
2002-08-29 15:00 ` Roman Prokhorov
2002-08-30 0:05 ` Paul Pluzhnikov
2002-08-30 12:28 ` Roman Prokhorov
2002-08-30 15:04 ` Paul Pluzhnikov
2002-08-30 16:41 ` Roman Prokhorov
2002-08-30 18:04 ` Paul Pluzhnikov
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox