delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/02/26/12:30:49

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3A9A9190.163F18C3@reversion.ca>
Date: Mon, 26 Feb 2001 09:25:36 -0800
From: Craig Nelson <craig AT reversion DOT ca>
X-Mailer: Mozilla 4.08 [en] (X11; I; SunOS 5.8 i86pc)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: WSAStartup() _spawnlpe() and cygwin child processes

Hi All,

I have a raw MSVC++ "inetd" type of process that listen()s on a TCP/IP port and calls _spawnlpe() for each connection.
The spawned process is a cygwin process.  By setting the PATH in the spawnlpe command (such that it finds the cygwin1.dll and the correct .exe
- even in the same directory) I can get the process to run, except there are two small problems with the spawned cygwin process:

1.  The socket() function fails with error 10106 (WSAEPROVIDERFAILEDINIT- requested service provider could not be loaded or initialized)
2.  stdin, stdout, and stderr are all in O_TEXT mode (not O_BINARY).

If I run the cygwin process from the DOS prompt, these two symptoms go away and the process runs great.  I am running cygwin1.1.8-2 and
NT4sp6a.  The raw MSVC program links to the Ws_32.lib library.. if that really matters...

It appears that the spawned process is not running any of the cygwin initialization code.  Or that perhaps the required DLL's are loaded in a different
order.. ??  Is there a way to run the cygwin init stuff directly?  Is this the correct solution?

If you can help in any way, I'd really appreciate it!

Thanks,
Craig Nelson, Cameo Systems Inc.


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019