SmileeTiger
Programmer
I am running under unix and I want my program to start another program and print out the PID of the process that is started.
ie.
Prog1:
int main(..)
{
int pid;
pid=start(prog2, arg);
printf("Prog 2 has been started and has a PID of: %d\n", pid);
}
Normally I would use system() for this but it doesn't return the pid.
Suggestions?
Smilee
ie.
Prog1:
int main(..)
{
int pid;
pid=start(prog2, arg);
printf("Prog 2 has been started and has a PID of: %d\n", pid);
}
Normally I would use system() for this but it doesn't return the pid.
Suggestions?
Smilee