how can I call an other program in the currently running program using the spawn ... family of functions ?
I've tried calling a program called checksum which takes three char* args like this:
spawnl (P_WAIT, checksum arg1,arg2,arg3,NULL);
arg1 and arg3 are both filenames;arg1 is a file present in the working directory and arg3 is a file to be created by checksum.
arg2 is a simple char* switch.
Checksum.exe also exists in the same directory.
I can't get it to work ...
Can you help ?
Read the manual - spawnl args start at arg0, not arg1
spawnl (P_WAIT, checksum, checksum,arg1,arg2,arg3,NULL);