Hi,
Thanks you all Warren, David & Marcin.
I tell you what was the ghost!!! enjoy it!
You were all right!. I thought exactly as David, that is, const char * means
that the function internally takes the parameter as a constant. Well, for
that reason I did strcpy(), strcat, sprintf()… etc… to get the stuff
into the so called Cell variable. As I said the C program ran fine, but the
child process was complaining about the file name.
After displaying out about 3,000,000,000 Million times
what was inside
Cell was the “right” stuff and posting here for help …
the problem was just a no visible character on the screen, a fuc…’/n’
that came at the end of a string that my program sucks from a common buffer
in the network (nobody told me about that ‘/n’!!) and then it was
concatenated at the end of Cell!! i.e.
Cell ="Hello "
Buffer=“World’/n’”
Cell+Buffer=“Hello World/n”
So you see
Hello World
… and everything seems to be ok, till you do a strlen(Buffer) and
oopsss!!!
The thing became complicated when I counted wrongly and thought strlen() was
ok!!! from that point I started to space out.
Sorry about that folks! It was one of those days… 
JcD
“David Gibbs” <dagibbs@qnx.com> wrote in message
news:8uv5lc$eb2$1@nntp.qnx.com…
juan carlos <> jcd@dcs.st-and.ac.uk> > wrote:
Hi,
Is there any function or trick to start a process from another process,
which has not a
string literal (<const char *>) as the parameter for the file name that
contains the process to execute???
I think you misunderstand the meaning of the <const char *> for the
parameter – that doesn’t mean the parameter has to be a constant string.
That means that the function will not change the string, that is, that
the code inside the function must treat that string as a constant.
You can easily do something like:
char buffer[512];
sprintf(buffer, “%s%d”, progname, prog_instance);
spawn*(…, buffer, … );
-David