Please suggest what are the risk factors associated with this solution. I mean, delaying issues.
No risk. You just burn CPU cycles.
Consider putting it into
OnIdle, then at least you don't burn cpu time when you would need it in another place, then it should be ok.
But expect notebook users to complain because their fan will spin up...
Yet another solution might be to open a TCP connection or a named pipe or something. When one end is killed, the other end should be notified "connection closed".
Actually, you could think about using a named mutex too. If you hold a mutex and your process is killed, it should technically be unlocked by the OS (again, I don't know, but I think so). If that works, then it would be the easiest and most efficient way.
Both processes could create a named mutex and acquire the lock. Each process then spawns off a thread which acquires the other processes named mutex - it will block. When the OS terminates the other process, the Mutex is unlocked and the blocking thread wakes up, telling the other application to terminate.