This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: debugging threads vs processes
- To: "Nic Ferrier" <nferrier at tapsellferrier dot co dot uk>
- Subject: Re: debugging threads vs processes
- From: Per Bothner <per at bothner dot com>
- Date: 12 Jul 2001 19:59:27 -0700
- Cc: per at bothner dot com, java-discuss at sources dot redhat dot com
- References: <sb4e520a.001@tapsellferrier.co.uk>
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/