system() and fork() crashes when using DLLs
Status: Beta
Brought to you by:
pfalcon
If I link an executable with a DLL, any call to system() or fork()crashes. For instance, create foo.c:
#include <stdio.h>
#include <zlib.h>
int
main()
{
z_stream zs;
zs.zalloc = Z_NULL;
zs.zfree = Z_NULL;
zs.opaque = 0;
zs.total_in = 0;
deflateInit2(&zs,Z_BEST_COMPRESSION,Z_DEFLATED,13,8,Z_DEFAULT_STRATEGY);
system("/usr/bin/ls");
return 0;
}
gcc foo.c -lz
./foo.exe
[crash]
I'm using the 0.60 package with the 0.61 pw32.dll.
..wayne..