tom ehlert - 2016-08-26

also: with world.txt containing

world1
world2
01.12.2016

execute

set /p hello1=<world.txt
set /p hello2=<world.txt
date

echo %hello1%
echo %hello2%
echo %date%

should be fixed by maintainer; results from freely mixing

open()/dup() for file redirection, and fgets() for actual input
processing

fix: SHELL\COMMAND.C

int oldinfd = -1; / original file descriptor #0 (stdin) /
int oldoutfd = -1; / original file descriptor #1 (stdout) /
+long oldstdinpos;

...

if (in || (num > 1)) / Need to preserve stdin /
{
oldinfd = dup(0);
+ oldstdinpos = ftell(stdin);
}
...

if (oldinfd != -1) / Restore original STDIN /
{
close(0);
dup2(oldinfd, 0);
+ fseek(stdin, oldstdinpos, SEEK_SET );

close(oldinfd);
oldinfd = -1;

}

now I'm wondering how long it takes for

a) a new version of command.com on the website,

b) updateable by the famous FreeDOS 1.0 package management process,

c) updateable by the famous FreeDOS 1.1 package management process, which is different

d) updateable by the famous FreeDOS 1.2 package management process,
which is probably different, again