[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ORCA system() command ... help!
Hail,
please, someone help me. The following code produces (after executing
the system() call) an error message "Could not find file:" from the
system. Very strange.
#include <stdio.h>
#include <stdlib.h>
#include <strlib.h>
int
main (void)
{
int result;
char *it;
it = strdup ("compile -E -P test.c keep=test");
result = system (it);
return (result);
}
test.c does of course exist, strdup duplicates a string (and allocates
space for it via malloc). The same code w/o the strdup works (i.e. if
I chant 'result = system ("compile -E -P test.c keep=test");').
Very, very strange ....
Soenke
--
===========================================================================
More than silver, more than gold, I need ! behrenss@informatik.
electricity. I need it for my dreams. ! tu-muenchen.de
(RACTER) ! FIDO: 2:246/13 Soenke Behrens