Controlling processes knowing the PID's

Dear all,
suppose that I start a process (named "father"). "father" starts in turns a process called "child" with an execv call (after a fork). In this way "father" will be notified if "chlid" crashes (SIGCHILD mechanism). The problem is:
if "father" crashes, how can I do to be recreate a mechanism like that of SIGCHILD when I restart a process that will substitute "father", say "father1"?

Anyway, I have previously stored the PID of the "child" process.

I was trying to change the PPID of "child", but it seems it doesn't work.

Could you help me?

Depending on the version of unix that you are using, you may have a ptrace() system call that is really intended only for debuggers. You may be able to use this to attach to a process and arrange for notification of when it exits. I really would urge you to avoid that path. ptrace() is not portable and there may be performance consequences of using it.

Other than the ugly ptrace() solution, I know of no other way to do this. The most reasonable thing to do is to fix "father" so that it no longer crashes.