Mail Archives: djgpp/1997/11/24/05:06:40
Dear programmers,
Some days ago we posted a simple code that crashed under
NT 4.0 because some strange behaviour of the system() call.
As we still worked with DJGPP v2.00, we upgrade to DJGPP v2.01 but
without success. The problem persisted.
Following Eli recommendations, we used:
#include <crt0.h>
int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;
at the beginning of the code, and it really worked (thanks Eli!!).
We have learned that under NT we must use this; otherwise, if we include
some system() call and we later access some file, the program will probably
crash. Althought our problem is already solved, it suggest the possibility
of initializing this variable to _CRT0_FLAG_UNIX_SBRK already in the default
DJGPP compilation to avoid problems in the increasing users of NT.
But perhaps there is some important inconvenience in using
_crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK
in DOS, Win. 3.1x or Win. 95. Is there someone that could provide info
about drawbacks of this?
Thank you!
Xavier Pons & Joan Maso
- Raw text -