Subject: fork in win95 osr2
From: [email-masked] (William Lau)

14 Feb 1998 21:46:30 -0800
Message-ID: <003401bd39d1$7b203ba0$030101c0.cygnus.gnu-win32@bart>
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0031_01BD3A14.8836EDA0"
To: <[email-masked]>

This is a multi-part message in MIME format.

------=_NextPart_000_0031_01BD3A14.8836EDA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,
    I've just installed b18 of the developer packaged and tried a simple =
fork program in win95 osr 2 and win nt 4.0 SP3.=20
the following is the code...

#include <stdio.h>

void main()
{
 fork();
 printf("hello");
}

It worked fine on nt, but went cukoo with 95. The following is what 95 =
returned...

C:\tmp>a
hellohello(C:\TMP\A.EXE 1001) In cygwin_except_handler
(C:\TMP\A.EXE 1001) Exception trapped!
(C:\TMP\A.EXE 1001) exception C0000005 at BFF76F09
(C:\TMP\A.EXE 1001) exception: ax 81602049 bx 0 cx 7E9F227F dx 0
(C:\TMP\A.EXE 1001) exception: si 7E9F227F di 1000B8B3 bp 253F3A4 sp =
253F360
(C:\TMP\A.EXE 1001) exception is: STATUS_ACCESS_VIOLATION
(C:\TMP\A.EXE 1001) Stack trace:
(C:\TMP\A.EXE 1001) frame 0: sp =3D 0x253F178, pc =3D 0x1000CEC2
(C:\TMP\A.EXE 1001) frame 1: sp =3D 0x253F194, pc =3D 0xBFF76780
(C:\TMP\A.EXE 1001) frame 2: sp =3D 0x253F1B8, pc =3D 0xBFF858F3
(C:\TMP\A.EXE 1001) frame 3: sp =3D 0x253F250, pc =3D 0xFFECBAD7
(C:\TMP\A.EXE 1001) frame 4: sp =3D 0x253F3A4, pc =3D 0x10027BEA
(C:\TMP\A.EXE 1001) frame 5: sp =3D 0x253F3B4, pc =3D 0x1000C223
(C:\TMP\A.EXE 1001) frame 6: sp =3D 0x253F3C8, pc =3D 0x1002DFF3
(C:\TMP\A.EXE 1001) frame 7: sp =3D 0x253F3DC, pc =3D 0x1000C108
(C:\TMP\A.EXE 1001) frame 8: sp =3D 0x253FE0C, pc =3D 0x1000C113
(C:\TMP\A.EXE 1001) frame 9: sp =3D 0x253FE18, pc =3D 0x4011BD
(C:\TMP\A.EXE 1001) frame 10: sp =3D 0x253FE28, pc =3D 0x40103B
(C:\TMP\A.EXE 1001) frame 11: sp =3D 0x253FE38, pc =3D 0xBFF88E93
(C:\TMP\A.EXE 1001) frame 12: sp =3D 0x253FF78, pc =3D 0xBFF88D41
(C:\TMP\A.EXE 1001) frame 13: sp =3D 0x253FFF4, pc =3D 0xBFF87759
(C:\TMP\A.EXE 1001) frame 14: sp =3D 0x8164AB7C, pc =3D 0x3
(C:\TMP\A.EXE 1001) In cygwin_except_handler
(C:\TMP\A.EXE 1001) Error while dumping state (probably corrupted stack)

Fork seems to work(managed to print 'twice'), but i dunno y it stuffs up =
after.
both these program were run on the same machine. is this a bug??
any info/pinters will be greatly appreaciate.

Cheers

William

------=_NextPart_000_0031_01BD3A14.8836EDA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi all,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; I've just =
installed b18 of=20
the developer packaged and tried a simple fork program in win95 osr 2 =
and win nt=20
4.0 SP3. </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>the following =
is the=20
code...</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>#include =
&lt;stdio.h&gt;</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>void=20
main()<BR>{<BR>&nbsp;fork();<BR>&nbsp;printf(&quot;hello&quot;);<BR>}</FO=
NT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>It worked fine on nt, but went cukoo =
with 95.=20
The following is what 95 returned...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 =
size=3D2>C:\tmp&gt;a<BR>hellohello(C:\TMP\A.EXE 1001) In=20
cygwin_except_handler<BR>(C:\TMP\A.EXE 1001) Exception =
trapped!<BR>(C:\TMP\A.EXE=20
1001) exception C0000005 at BFF76F09<BR>(C:\TMP\A.EXE 1001) exception: =
ax=20
81602049 bx 0 cx 7E9F227F dx 0<BR>(C:\TMP\A.EXE 1001) exception: si =
7E9F227F di=20
1000B8B3 bp 253F3A4 sp 253F360<BR>(C:\TMP\A.EXE 1001) exception is:=20
STATUS_ACCESS_VIOLATION<BR>(C:\TMP\A.EXE 1001) Stack =
trace:<BR>(C:\TMP\A.EXE=20
1001) frame 0: sp =3D 0x253F178, pc =3D 0x1000CEC2<BR>(C:\TMP\A.EXE =
1001) frame 1:=20
sp =3D 0x253F194, pc =3D 0xBFF76780<BR>(C:\TMP\A.EXE 1001) frame 2: sp =
=3D 0x253F1B8,=20
pc =3D 0xBFF858F3<BR>(C:\TMP\A.EXE 1001) frame 3: sp =3D 0x253F250, pc =
=3D=20
0xFFECBAD7<BR>(C:\TMP\A.EXE 1001) frame 4: sp =3D 0x253F3A4, pc =3D=20
0x10027BEA<BR>(C:\TMP\A.EXE 1001) frame 5: sp =3D 0x253F3B4, pc =3D=20
0x1000C223<BR>(C:\TMP\A.EXE 1001) frame 6: sp =3D 0x253F3C8, pc =3D=20
0x1002DFF3<BR>(C:\TMP\A.EXE 1001) frame 7: sp =3D 0x253F3DC, pc =3D=20
0x1000C108<BR>(C:\TMP\A.EXE 1001) frame 8: sp =3D 0x253FE0C, pc =3D=20
0x1000C113<BR>(C:\TMP\A.EXE 1001) frame 9: sp =3D 0x253FE18, pc =3D=20
0x4011BD<BR>(C:\TMP\A.EXE 1001) frame 10: sp =3D 0x253FE28, pc =3D=20
0x40103B<BR>(C:\TMP\A.EXE 1001) frame 11: sp =3D 0x253FE38, pc =3D=20
0xBFF88E93<BR>(C:\TMP\A.EXE 1001) frame 12: sp =3D 0x253FF78, pc =3D=20
0xBFF88D41<BR>(C:\TMP\A.EXE 1001) frame 13: sp =3D 0x253FFF4, pc =3D=20
0xBFF87759<BR>(C:\TMP\A.EXE 1001) frame 14: sp =3D 0x8164AB7C, pc =3D=20
0x3<BR>(C:\TMP\A.EXE 1001) In cygwin_except_handler<BR>(C:\TMP\A.EXE =
1001) Error=20
while dumping state (probably corrupted stack)<BR></FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>Fork seems to work(managed to print =
'twice'),=20
but i dunno y it stuffs up after.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>both these program were run on the =
same machine.=20
is this a bug??</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>any info/pinters will be greatly=20
appreaciate.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>Cheers</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>William</FONT></DIV></BODY></HTML>

------=_NextPart_000_0031_01BD3A14.8836EDA0--

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