debugging threads vs processes

Per Bothner per@bothner.com
Thu Jul 12 19:56:00 GMT 2001


Thanks to everybody who responded!  I still have no idea why
the server is crashing (possibly some weird interaction between
Apache's use of threads and Java's use of threads?), but my
confusion is now at a higher plane of enlightenment!

"Nic Ferrier" <nferrier@tapsellferrier.co.uk> writes:

>    The pid field is the result of getpid(), the prev field 
>    is the value saved by the last request in a static 
>    variable.  ps -H claims that 16694 and 16697 are 
>    siblings, not parent/child.  But then how can 16697 
>    remember a static value set by 16694?  Unless they 
>    are two threads in the same process, in which case 
>    getpid is returning the thread id, rather than a process id.
> 
> Got me there. Are they both talking back to the data stored in the
> parent?

Presumably getpid is actually returning thread id (given that you
can't tell them apart) so 16694 and 16697 are actually two threads
in the same process.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/



More information about the Java mailing list