Date: Thu, 7 May 1998 10:24:44 +0300 (IDT) From: Eli Zaretskii To: Kbwms cc: djgpp AT delorie DOT com Subject: Re: Knowledge Base Found & Difficulties with Start-up Code In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 6 May 1998, Kbwms wrote: > This problem is somehow connected to my Unix-like shell for DOS. When > make spawns a program under the shell (from Thompson Automation), it > fails to receive a full complement of arguments. Please tell me the details of how do you spawn a program. A code fragment which does that would be enough. In particular, it matters whether you use the library function `system' or one of the `spawnXX' family to do that (the way this is handled by the library is different). You might also learn further about various aspects of this (or even find a solution) by reading the libc reference, under `system' and `spawnXX'. Should you need to know more, the library sources tell the whole story (look for src/libc/ansi/stdlib/system.c and src/libc/dos/process/dosexec.c). If you run the child program with `system', one possibility is that `system' calls the shell to do everything, if it decides that your shell's name looks like a Unixy shell. If that's the case, your shell needs to be told that DJGPP programs are to be passed arguments via response files, like this: prog @file and it should put all the arguments on that response file. This is because that shell is probably a non-DJGPP program, and so it doesn't support the other DJGPP ways of passing long command lines. > When I switch to a > DOS window, my program receives all 38 arguments. This is ironic since > the shell is supposed to have a huge buffer for arguments - something > like 1840 characters for a single command. I am seeking assistance from > the supplier, as you might imagine. I'm guessing that the problem is not in the shell, but in how it passes arguments to DJGPP programs. Btw, there is an excellent DJGPP port of Bash (v2gnu/bsh1147b.zip) which you might try using. When running DJGPP programs, this is IMHO the best shell you could use, since it fully supports all DJGPP features, both interactively and in batch mode. I have been using it for almost two years running extremely complex Unix shell scripts almost unaltered, even on plain DOS, with no significant problems.