Subject: Re: fork bugs (was: newbie)
From: [email-masked] (Scott Kempf)

21 Jan 1997 16:25:00 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: [email-masked]
Original-Sender: [email-masked]

I'm not sure, but this could be the same fork bug I've
been trying to locate all week.  The following script
causes an access violation.

	#!/bin/sh
	sleep 2 &
	sleep 1

I've found that simple C programs where the parent quits
before the child cause the child to crash.  The child will
crash when it tries to exit() or write to stdout or stderr.
I've stepped thought the exit() of the parent and the child
is fine right up to when the parent calls ExitProcess().

I've started studying up on Win32, so I may hit problem and
solution soon.  Please let me know if someone has already
diagnosed or fixed this problem.

_

As long as I'm on fork bugs, there is a limit to the size
of the stack that fork can handle.  If I remember it is 128K.
It seems to me that the fork/dcrt0 code should be patched
to pass that stack size from parent to child, instead of
allocated a fixed 128K sized stack, but I'm not yet ready
to change winsup.h.

_

One more fork bug.  I has some problems with fork where
I had an executable in . and one in /usr/local/bin which
where two different versions of the same program.  Fork
choose to spawn the wrong one and made quite a mess trying
to copy in the data section.  I found the problem and
removed the out dated executable from  /usr/local/bin.
Later I decided to try to fix this bug, but I have been
unable to recreate it.  If someone has a simple example
of this bug I'd love to try to fix the problem.

			    Scott
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".