server bootstrapping upon connection (WARNING: LONG)

Benjamin Han this at is.for.spambot
Wed Feb 11 14:38:01 EST 2004


On 2004-02-11 14:23:33 -0500, Alan Kennedy <alanmk at hotmail.com> said:

> [Benjamin Han]
>> But as described, the ps log showed two entries of fooServer.py, but in
>> the log produced, only one server actually was started (I can tell that
>> from the PID in the log file). I really can't explain this discrepency!
> 
> Quick sanity check: Are you using an operating system that reports an
> entry in the ps list for every *thread* of a process, rather an entry
> for every process, as you might expect. So if you have 2 threads
> running under the "fooServer.py" process, you get 2 entries in the
> output of ps, rather than 1.
> 
> Some unixen do this.
> 
> HTH,

Hm, this is Mac OS X 10.3.2, and I checked the man page of ps, it has 
another option '-M' to show the threads (which I didn't use to produce 
the ps log in question) - but of course they all show up with the same 
PID, not the phenomena I saw in the ps log file (where more than one 
fooServer.py processes showed up with unique PIDs).

But fooServer.py does use more than one thread (both from the 
SocketServer.ThreadingTCPServer and from some other threads it creates).




More information about the Python-list mailing list