Basic simulation of mainly job control.
Usage
- Type
jobsto view all the background jobs (running as well as stopped). - Type
start xwhere x is the pid of the stopped background job which you want to run in background. - Type
stop xwhere x is the pid of the running background job which you want to stop in background. - Append
&in the end of command to make the process as background job. - Press
Ctrl + \to kill all the jobs (running as well as stopped). - Type
quitto quit the main program.
Note
- Main program is itself immune to
Ctrl + C,Ctrl + Z,Ctrl + \. - To stop a foreground job running press
Ctrl + C.
BUG
- While a foreground job is running pressing
Ctrl + Zsends SIGTSTP to the process but doesn't returns the control back to the main program which makes the main program hang. In this case start another terminal and send SIGKILL to the foreground job from there.