Subject: Re: sockets and fork() under b18 coolview
From: [email-masked] (Riccardo D'Altoe')

6 Feb 1998 06:09:52 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="------------msB247B1D181D1B230550690C7"
To: Craig Nelson <[email-masked]>
Cc: [email-masked]

This is a cryptographically signed message in MIME format.

--------------msB247B1D181D1B230550690C7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Craig Nelson wrote:

> I am having trouble with a socket request server under win95.
>
> If I write a program to handle incoming socket requests, one at a time, the
> program runs beautiful.  however, if I modify the program to use fork() to
> process each socket request, the program dumps, reporting that the stack is
> probably corrupted.
>
> I've tried to narrow the problem down using a small test case program, and that
> also runs fine with, or without fork().  But using the original program under
> every other unix works flawlessly as well (even purified).
>
> My theory is this:
>
>         -Because the original program runs fine with unix, i will assume its ok.
>
>         -Because the original program runs fine when used on gnu-win32 without
>          fork(), i will continue to assume that it's ok.
>
>         -The smaller test program only worked because it did not "do enough"
>          other processing for the system to realize that the stack had been
>          corrupted.
>
> And so I conclude that the problem is with fork() under gnu-win32.
>
> Has anyone else experienced this scenario with fork?
>
> I've checked all the archives, FAQs and everything, so this is my last resort.
>
> I would certainly appreciate any help anyone has to offer..
>

 I have had your same problem with the fork() on NT server 4.0
 with the version b17 and b18 of the GCC.
 In my program the fork() gave back -1 every time that I called the chdir(),
 otherwise it worked!!

+----------------------------------------------------------------------+
| D'Altoe' Riccardo                                                    |
+---------------------------------+------------------------------------+
| Politecnico di Torino           | phone:  +39-(0)11-5647090          |
| Dip. Automatica e Informatica   |                                    |
| corso Duca degli Abruzzi, 24    | e-mail: [email-masked]    |
| 10129 Torino                    |                                    |
| ITALY                           | fido  : riccardo daltoe 2:334/203  |
+---------------------------------+------------------------------------+

--------------msB247B1D181D1B230550690C7
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

--------------msB247B1D181D1B230550690C7--

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