Mail Archives: djgpp/2001/05/19/07:17:53
On Fri, 18 May 2001 12:53:19 +0300, "Eli Zaretskii"
<eliz AT is DOT elta DOT co DOT il> wrote:
>
>Your call puts a NULL pointer into the argv[] array passed to the
>child program. That's invalid usage: argv[] should at least have the
>argv[0] element non-NULL.
>
>Here's the correct way of doing this:
>
> char *argv[] = { "gcc", NULL };
>
> if (spawnvp(P_WAIT, "gcc", argv) == -1)
> printf ("spawn...() error!\n");
Incidentally, is there any way of calling a program with a command
line longer than 128 characters if it wasn't compiled by djgpp?
I'm thinking specifically of an executeable copy I have of lame where
command lines are liable to run to a couple of hundred characters.
(full path of input and output files, track information and encoding
options)
--
"You have viruses, but I have resistance, and I am alive, and you-
are dead." Ken Macleod The Star Fraction
- Raw text -