octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cygwin fork bug on Windows 9x


From: Paul Kienzle
Subject: cygwin fork bug on Windows 9x
Date: Sun, 02 Feb 2003 09:57:55 -0500
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212

Hi,

I've finally got a few lines of code which reproduce the error
message I see in cygwin for each dynamically loaded oct-file
every time I call a system function.


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 will work on purging cygwin of fork calls, and hopefully
that will fix the problem.  We need to do this anyway for
a mingw distribution.  Bonus: hopefully performance will
improve when calling system functions.

Anybody have experience using pipes in the Windows API?
Hints are much appreciated.  I think we can get away with
half-duplex pipes almost everywhere.

Thanks in advance,

Paul Kienzle
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]