This is the mail archive of the
mailing list for the Cygwin project.
forking from a DLL?
- From: Pierre-Philippe Coupard <pcoupard at easyconnect dot fr>
- To: cygwin at cygwin dot com
- Date: Fri, 31 Oct 2003 02:50:45 +0100
- Subject: forking from a DLL?
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 <firstname.lastname@example.org>
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