This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
bug: fork, LoadLibrary, Windows ME
- From: Paul Kienzle <pkienzle at users dot sf dot net>
- To: cygwin at cygwin dot com
- Date: Sun, 02 Feb 2003 09:52:54 -0500
- Subject: bug: fork, LoadLibrary, Windows ME
Hi,
I'm trying to debug a problem with Octave running under
Cygwin for Windows ME.
Every time I fork, I get a message box for each dynamically
loaded dll saying:
Octave has caused an error in SUB.DLL
Octave will now close.
This does not happen in Windows 2000.
The following code demonstrates the error:
--- dynmain.cc:
#include <iostream>
#include <windows.h>
int main(int argc, char *argv[])
{
HINSTANCE handle = LoadLibrary("dynsub.dll");
std::cout << "# Calling fork\n";
std::cout << (fork()?"parent\n":"child\n");
return 0;
}
--- dynsub.c:
#include <stdio.h>
void dynsub(void) { printf("in dynsub\n"); }
--- Makefile:
all: dynsub.dll dynmain.exe
dynmain.exe: dynmain.cc ; g++ -o $@ $<
dynsub.dll : dynsub.c ; gcc -shared -o $@ $<
I updated my cygwin distribution as of this morning (Feb 2, 2003) and
the problem persists.
Paul Kienzle
pkienzle@users.sf.net
--
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/