Mail Archives: djgpp/1998/02/04/10:13:43
On Wed, 4 Feb 1998 G DOT DegliEsposti AT ads DOT it wrote:
> IIRC system() passes the string to the shell for execution.
Not in DJGPP, it doesn't. Stock DOS shell is too dumb, so `system' in
DJGPP's C library does most of the work itself, and only calls the shell
for commands which are internal to the shell.
> if you try "readme.txt" under command.com you will get "bad command or file
> name" (or something like that).
That's because COMMAND.COM looks at the extension and refuses to run files
whose extension is not one of those it knows about. Try renaming some
README.TXT into README.COM and type "README.COM [Enter]": DOS will crash.
DJGPP's `system' cannot restrict itself to only a handful of extensions,
since it needs to support interpreters such as Unix shells, Awk, Perl
etc. whose scripts can have arbitrary extensions.
- Raw text -