Date: Wed, 4 Feb 1998 17:10:50 +0200 (IST) From: Eli Zaretskii To: G DOT DegliEsposti AT ads DOT it cc: djgpp AT delorie DOT com Subject: Re: System crashing - system( "readme.txt" ); In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.