Menu

#18 system() and fork() crashes when using DLLs

just_bug
open
nobody
Core lib (13)
5
2000-10-09
2000-10-09
No

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

Discussion


Log in to post a comment.

MongoDB Logo MongoDB