PDA

View Full Version : replace existing process with the new one



memus
14th August 2008, 16:35
Like in topic. How to run process and then quit existing one ?
I was trying to play around with QProcess by when I killed process that was running I was also killing the process that had been running before
This is example what i want to do but in c:


pid_t pid;
if ((pid = fork()) < 0)
system("...."); //the new one
else if (pid != 0)
exit (0);

setsid();

Any ideas ?

jacek
14th August 2008, 16:40
See QProcess::startDetached().