forking from a DLL?

Pierre-Philippe Coupard pcoupard@easyconnect.fr
Fri Oct 31 04:14:00 GMT 2003


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@easyconnect.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/



More information about the Cygwin mailing list