delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/30/20:52:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3FA1BFF5.2000905@easyconnect.fr>
Date: Fri, 31 Oct 2003 02:50:45 +0100
From: Pierre-Philippe Coupard <pcoupard AT easyconnect DOT fr>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030930 Debian/1.4-5
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: forking from a DLL?

Hello everybody,

I'm trying to port my program (CWirc) to Windows, but I'm having an odd 
problem related to fork.

Here's the problem : my program is made of 2 parts, a standalone 
frontend, and an X-Chat plugin stub that calls it. Under Windows, X-Chat 
plugins are in the form of DLLs. So far I got the DLL to build, get 
loaded and initialized correctly in X-Chat.

However, at some point in the DLL, I need to do a fork (so I can set 
things up then to an exec() in the child) : normally, in the child, the 
execution continues right after the fork, but under Cygwin, it seems to 
resume at the start of the X-Chat program, i.e. instead of doing 
whatever it's meant to do, I get a new X-Chat start window, just like if 
I had started another X-Chat by hand. When I close that new X-Chat 
window, my plugin informs me that the fork call failed. Nothing crashes 
and everything continues to run fine afterward.

Does anybody know what my problem might be? is it possible to fork in a 
DLL at all, in fact? From what I read, I understand that fork is a 
tricky affair for Cygwin, but I'm not quite sure what its limitations 
are, if any.

For information, I run Win98, and it's the second time I install Windows 
in my life, so I'm sorry if my question is candid.

-- 
Pierre-Philippe Coupard <pcoupard AT easyconnect DOT fr>
Software Engineer
--
Never try to outstubborn a cat.
		-- Lazarus Long, "Time Enough for Love"


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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