Mail Archives: djgpp-workers/2001/12/16/15:55:08
On Sun, 16 Dec 2001, Tim Van Holder wrote:
> > It can be reproduced in a nice 3 line makefile:
> >
> > SHELL = /bin/sh
> > all:
> > MAKE="$(MAKE)"
> >
> > make on this with bash being 2.04 works fine, on 2.05 gives the binary
> > file error (using bash 2.05 from cvs build directory on clio). Yes,
> > that's a tab before the MAKE.
>
> I tried to see if this was relatd to system() in
> any way, and clearly it was not (system("FOO=$FOO") works fine).
>
> But I did find a different, very weird bug (which I don't recall being
> mentioned before): while
>
> int
> main(void)
> {
> system("");
> }
>
> and
>
> int
> main(void)
> {
> system("Foo=bar");
> }
>
>
> both, as expected, spawn a single instance of command.com, and exit
> after
> that shell is exited, the following does not:
>
> int
> main(void)
> {
> system("");
> system("Foo=bar");
> }
I guess Your executable were named foo.exe.
========
In this case it's not surprising. I fell into the same trap.
Tested it under DOSEMU-1.0.2 running under Linux (in SSH session as I'm
currently about 300 km away)
As far as I tested system ("Foo=bar") is interpretted as
'Foo "=bar"'
Andris
>
> I'd expect this to run command.com, when that's exited run it again, and
> then exit. But instead I get a seemingly infinite series of
> command.coms;
> the only way to get out seems to be to type Ctrl-C, as that causes the
> executable to SIGINT out after exiting the subshell.
>
> This is with straight clio packages for djdev & gcc3. It does not
> happen
> with two 'system("")' calls.
>
>
>
>
- Raw text -