[B20.1 Win95] Problem with socket() function call.

Andrew M. Bishop amb@gedanken.demon.co.uk
Sun Jan 31 23:52:00 GMT 1999


> > depending on the fact that under WinNT, socket handles are inherited by
> > child processes by default.  Unfortunately, a bug in Windows 95 (which you
> > indicate that you're running) causes this to not be true; see MS knowledge
> > base article Q150523 for details.  I don't know if this was fixed in
> > Windows 98.

> > Anyway, the fix for your program is probably to do the WSADuplicateSocket
> > stuff yourself or to upgrade to Windows NT.  
> 
> Upgrading to Windows NT is not an option since I am trying to port one
> of my own UNIX programs to win95.

I downloaded Winsock 2 from www.microsoft.com and installed it on the
Windows 95 machine.  This time running the same test program as before
there is now a crash in one of the Winsock DLLs rather than an
EINPROGRESS error as there was before.

-------------------- winsock 1.1 strace --------------------
[main] TESTW32 1006 (0) winsock_init: res 0
[main] TESTW32 1006 (0) winsock_init: wVersion 257
[main] TESTW32 1006 (0) winsock_init: wHighVersion 257
[main] TESTW32 1006 (0) winsock_init: szDescription Microsoft Windows Sockets Version 1.1.
[main] TESTW32 1006 (0) winsock_init: szSystemStatus Running on Windows 95.
[main] TESTW32 1006 (0) winsock_init: iMaxSockets 256
[main] TESTW32 1006 (0) winsock_init: iMaxUdpDg 65467
[main] TESTW32 1006 (0) winsock_init: lpVendorInfo 1627483856
[main] TESTW32 1006 (0) set_process_mask: old mask = FFFFFFFF, new mask = 0
[main] TESTW32 1006 (0) __release_signal_mutex: released for exceptions.cc:352
[main] TESTW32 1006 (0) fork: 0 = fork()
[main] TESTW32 1006 (0) _close: close (3)
[main] TESTW32 1006 (0) __block_sig_dispatch: waiting for signal_mutex (0xE)
[main] TESTW32 1006 (0) __release_signal_mutex: released for winsup.h:720
[main] TESTW32 1006 (0) _close: 0 = close (3)
[main] TESTW32 1006 (0) cygwin_gethostbyname: mark in net.cc:800 gethostbyname
[main] TESTW32 1006 (0) cygwin_gethostbyname: h_name g1
[main] TESTW32 1006 (0) cygwin_gethostbyname: mark out net.cc:812 gethostbyname
[main] TESTW32 1006 (0) cygwin_socket: mark in net.cc:462 socket
[main] TESTW32 1006 (0) cygwin_socket: socket (2, 1, 0)
[main] TESTW32 1006 (0) set_winsock_errno: 10036 (WSAEINPROGRESS) -> 119
[main] TESTW32 1006 (0) cygwin_socket: mark out net.cc:495 socket
[main] TESTW32 1006 (0) cygwin_socket: -1 = socket (2, 1, 0)
-------------------- winsock 1.1 strace --------------------

-------------------- winsock 2.2 strace --------------------
[main] TESTW32 1011 (0) winsock_init: res 0
[main] TESTW32 1011 (0) winsock_init: wVersion 514
[main] TESTW32 1011 (0) winsock_init: wHighVersion 514
[main] TESTW32 1011 (0) winsock_init: szDescription Microsoft wsock32.dll, ver2.2, 32bit of Feb  6 1998, at 14:18:02.
[main] TESTW32 1011 (0) winsock_init: szSystemStatus On Win95.
[main] TESTW32 1011 (0) winsock_init: iMaxSockets 32767
[main] TESTW32 1011 (0) winsock_init: iMaxUdpDg 65467
[main] TESTW32 1011 (0) winsock_init: lpVendorInfo 1627483856
[main] TESTW32 1011 (0) set_process_mask: old mask = FFFFFFFF, new mask = 0
[main] TESTW32 1011 (0) __release_signal_mutex: released for exceptions.cc:352
[main] TESTW32 1011 (0) fork: 0 = fork()
[main] TESTW32 1011 (0) _close: close (3)
[main] TESTW32 1011 (0) __block_sig_dispatch: waiting for signal_mutex (0xE)
[main] TESTW32 1011 (0) __release_signal_mutex: released for winsup.h:720
[main] TESTW32 1011 (0) _close: 0 = close (3)
[main] TESTW32 1011 (0) cygwin_gethostbyname: mark in net.cc:800 gethostbyname
-------------------- winsock 2.2 strace --------------------

-------------------- page fault --------------------
TESTW32 caused an invalid page fault in
module WS2_32.DLL at 0137:0e5f4ff9.
Registers:
EAX=00000024 CS=0137 EIP=0e5f4ff9 EFLGS=00010216
EBX=0e7207a0 SS=013f ESP=0253fc70 EBP=0253fd64
ECX=00000009 DS=013f ESI=0e610f50 FS=197f
EDX=00000003 ES=013f EDI=1000483a GS=24f6
Bytes at CS:EIP:
f3 a5 8b c8 83 e1 03 f3 a4 eb 0d 66 83 63 44 00 
Stack dump:
0e610f08 0000044c 004010e6 0e5f4821 0e610f48 81544c64 000003f2 0253fdd0 \
815436fc 00000028 02550820 61064944 0253fcd8 6105bcbe 61061104 025507a0 
-------------------- page fault --------------------

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb@gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list