Jobs verse Processes
I see how "jobs" will give me a list of jobs running along with their job number. I can fg, bg, or kill them by using % before the job number.
Each one of these jobs also has a process identification. It appears I can kill a process using this identification (without the %), but cannot do bg or fg.
Thank you |
In a nutshell, jobs lists the processes known or run from the shell which you are typing in at the time.
If you open a new command shell and don't execute any jobs, you'll likely see no jobs. The ps command shows processes and will show the shell process you are in as well as the ps you executed, by default. You can add arguments to see all processes for yourself or other users. The process ID in both is the actual process ID handle assigned by the system. If you look at the /proc directory, you will see sub-directories matching all the processes in your system. Everything in Linux is coupled to files. Down in those directories, you'll see information about the process, the file handles open, and other useful/interesting stuff. If you use Code:
jobs -l Code:
[1]+ 3072 Running emacs & To see all processes known to the system, use "ps -ef". Harder to describe whether something is a daemon versus not. A convention is that the name or many daemons ends with a "d", so if I were to write a "main daemon" I may choose to call it "maind"; however I write some daemons for embedded systems and I don't care about conventions, I know my process names, and therefore if I have a main program named "charlie" and I have it so that it becomes a daemon when run, the name of that process and any children will be "charlie", but that's my business in a closed architecture. I wrote a blog entry about daemons which is pretty involved and there's a further link in there which is one of the sources for information about this. Feel free to peruse that, it is here. |
Thank you rtmistler,
Both your reply to my question, and your referenced blog were very helpful. |
All times are GMT -5. The time now is 06:14 AM. |