[Tutor] Python Daemon

Kalle Svensson kalle@gnupung.net
Mon, 12 Mar 2001 02:26:30 +0100


Sez Tim Johnson:
[snip]
> [tim@shecom sem2]$ python daemontest.py 
> shutting down parent process: 12234
> [tim@shecom sem2]$ ps   
>   PID TTY          TIME CMD
> 11995 pts/2    00:00:00 bash
> 12234 pts/2    00:00:00 python  # yo!! There it is 
> 12235 pts/2    00:00:00 ps
> # if at the same time, I go to another terminal and query processes
> # this is what I see:
> [tim@shecom tim]$ ps
>   PID TTY          TIME CMD
> 12228 pts/1    00:00:00 bash
> 12236 pts/1    00:00:00 ps
> # Now, my questions are :
> Did I really create a daemon or did I just create a background process?
> If I did create the daemon, how do I verify that?

You'll have to use "ps ax" to see all processes.  "man ps" is your friend.
Use grep to filter them: "ps ax | grep python | grep -v grep".

Peace,
  Kalle
-- 
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
 [ Not signed due to lossage.  Blame Microsoft Outlook Express. ]