How do we know if the process is killed/terminated?

In Exe 4.1, I used the Ctrl+Z option and the process is suspended. But only writing kill PID stopped the robot.
Q1. Does the stoppage of robot means the process is killed?
If yes, then why do we need bg command?
If no, then why does the robot stop?
Q2. I didn’t understand how do we understand that the process is stopped using ps faux | grep test_process visulalization code?

Hi @abdulbasitisdost,

when you press CTRL+Z, the process is suspended. The bg (background) command runs the suspended program in background mode.

If the robot kept moving while the publisher was stopped, that may be because the robot was responding to the latest message published in the topic.

For question 2, just with ps faux | grep PROCESS_NAME it is not easy to know whether the program is stopped or not. It can be used to know that a process exists, even if stopped.

To know the list of programs running in the background in the current terminal, you can just type the command below:


Please let us know should you have any further questions.

Thanks a lot Sir. Appreciate that