public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* forking from a DLL?
@ 2003-10-31  4:14 Pierre-Philippe Coupard
  2003-10-31  4:23 ` Christopher Faylor
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Philippe Coupard @ 2003-10-31  4:14 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: forking from a DLL?
  2003-10-31  4:14 forking from a DLL? Pierre-Philippe Coupard
@ 2003-10-31  4:23 ` Christopher Faylor
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Faylor @ 2003-10-31  4:23 UTC (permalink / raw)
  To: cygwin

On Fri, Oct 31, 2003 at 02:50:45AM +0100, Pierre-Philippe Coupard wrote:
>Does anybody know what my problem might be? is it possible to fork in a 
>DLL at all, in fact?

forking in a DLL should be possible but given the strange way that windows
loads dlls into different addresses in child processes, it is probably
not going to work in practice.
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam@sourceware.org
and be permanently blocked from mailing lists at sources.redhat.com

--
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-31  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-31  4:14 forking from a DLL? Pierre-Philippe Coupard
2003-10-31  4:23 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).