This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 <>
Software Engineer
Never try to outstubborn a cat.
		-- Lazarus Long, "Time Enough for Love"

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]