| delorie.com/archives/browse.cgi | search |
| 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 |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <3C8F88DA.C965DD64@axlog.fr> |
| Date: | Wed, 13 Mar 2002 17:14:02 +0000 |
| From: | Stephane Corbe <sc AT axlog DOT fr> |
| X-Mailer: | Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u) |
| X-Accept-Language: | fr, en |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | dll call and fork |
| References: | <20020313150621 DOT S29574 AT cygbert DOT vinschen DOT de> <LOBBKDBPKEGJJFKNFHKBOEOLGJAA DOT boriss AT web DOT de> <20020313163641 DOT W29574 AT cygbert DOT vinschen DOT de> |
Hello,
If I fork my programm,
the child died when it call a function in a DLL. (Cygwin 1.3.10-1 on
NT4)
void dll_call(int i)
{
printf("in dll_call %d\n", i);
}
...
printf("begin");
switch (pid=fork())
{
case 0 :
printf("child is alive\n");
dll_call(pid);
printf("after dll_call\n");
break;
case -1 :
printf ("fork error\n");
break;
default:
printf ("parent is alive\n");
dll_call(pid);
while (1); // or sleep; gets, ... same result
}
Output is :
begin
child_is_alive
parent is alive
in dll_call 0
/* nothing else */
Did you see this before ?
Stephane
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |