I want to kill the 1st process then I wan to run the 2nd process. how can I do that?
I want to do in embedded linux, How can I do that? I have no idea. Any sample example would be helpful. The 2nd process should run independently, there should not be any relation between 1st and 2nd process.
You can use
forkto create a child process and then do stuff in both processes. You don't need multiple processes for everything: you might want to read about threading vs multiprocessing.This is an example for your scenario using
fork: