This reminds me of this old worm that would consist of 2 processes. If one of the processes was killed, the other one would respawn it and vice versa.
If this software is supposed to run on linux you can simply use /etc/inittab
with the respawn
option.