From the djgpp mailing list:

-------- Original Message --------
Subject: CMDXSWP.COM missing from list of DOS shells
Date: Fri, 02 Apr 2004 22:11:25 GMT
From: Fabrizio Gennari <[EMAIL PROTECTED]>
Organization: TIN
Newsgroups: comp.os.msdos.djgpp

FreeDOS distributes a shell called CMDXSWP.COM, which is a DOS-style
shell. i.e. requires the /c switch when launching commands.
Unfortunately, it is not present in the list of DOS-style shells present
 in the file libc/dos/process/dosexec.c, variable shell_brokets. Since
FreeDOS by default sets the COMSPEC env variable to point to this, it
may cause problems: for example, the system() function invokes the shell
without /c, causing the invocation to fail.

Example: take this somple program

int main(){
        system("echo Hello World!");
        return 0;
}

, compile it with DJGPP, and run it on a FreeDOS system with FreeDOS
installed, no SHELL variable and the variable COMSPEC pointing to
CMDXSWP.COM . It fails, because system(), detecting that echo is not an
executable file, tries to launch the shell, passing "echo Hello World!"
as the parameter. Unfortunately, it does that without the /c switch.

The fix would be to include CMDXSWP.COM in dosexec.c. A workaround is to
 set the SHELL variable to COMMAND.COM, which is correctly detected by
DJGPP as being a DOS-style shell.


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to