After calling fork
, the current process will call exit(0)
.
But the child will continue.
switch(fork())
{
case -1:
exit(1);
case 0:
// child process continues
break;
default:
// the current process exits
exit(0);
}
How can I continue debugging the child process in this case?