Subject: Re: MSVC++, fork() and cygwin.dll
From: [email-masked] (aspa)

20 Feb 1997 12:29:22 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <Pine.SOL.3.91.970220212350.18981B-100000.cygnus.gnu-win32@hydra>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sender: masplund@hydra
Original-To: "'GnuWin Mailing List'" <[email-masked]>
In-Reply-To: <c=GB%a=_%p=The_SQL_Group%l=[email-masked]>
Original-Sender: [email-masked]

On Thu, 20 Feb 1997, Frederick Jowett wrote:

> I can build such a program using gcc, and it seems to work fine.
> However, when I try the same with Microsoft Visual C++ 4.2, the code
> builds ok, but crashes upon execution of the fork() call (with an
> "Access Violation").

i get the same result from a test program (compiled with gnu-win32 and
cygwin32 api) that just fork()s 2 times and then each process prints a
message on stdout. here's the output:

first child
second child
parent
(fork-test.exe 1055) In cygwin_except_handler
(fork-test.exe 1055) Exception trapped!
(fork-test.exe 1055) exception C0000005 at 10001083
(fork-test.exe 1055) exception: ax FFFF265F bx 286 cx C104B0A0 dx 0
(fork-test.exe 1055) exception: si 0 di 256F644 bp 256F714 sp 256F638
(fork-test.exe 1055) exception is: STATUS_ACCESS_VIOLATION
(fork-test.exe 1055) Stack trace:
(fork-test.exe 1055) frame 0: sp = 0x256F450, pc = 0x10012802
(fork-test.exe 1055) frame 1: sp = 0x256F46C, pc = 0xBFF7663C
(fork-test.exe 1055) frame 2: sp = 0x256F490, pc = 0xBFF859D9
(fork-test.exe 1055) frame 3: sp = 0x256F528, pc = 0xFFECBAD7
(fork-test.exe 1055) frame 4: sp = 0x256F714, pc = 0x100186CB
(fork-test.exe 1055) frame 5: sp = 0x256F780, pc = 0x401099
(fork-test.exe 1055) frame 6: sp = 0x256F78C, pc = 0x10011BEB
(fork-test.exe 1055) frame 7: sp = 0x256FE14, pc = 0x10011BFF
(fork-test.exe 1055) frame 8: sp = 0x256FE20, pc = 0x401248
(fork-test.exe 1055) frame 9: sp = 0x256FE30, pc = 0x401012
(fork-test.exe 1055) frame 10: sp = 0x256FE38, pc = 0xBFF88F75
(fork-test.exe 1055) frame 11: sp = 0x256FF78, pc = 0xBFF88E23
(fork-test.exe 1055) frame 12: sp = 0x256FFF4, pc = 0xBFF8783F
(fork-test.exe 1055) frame 13: sp = 0x815882EC, pc = 0x3
(fork-test.exe 1055) In cygwin_except_handler
(fork-test.exe 1055) Error while dumping state (probably corrupted stack)

--
		aspa

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