[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] pthreads undren



Simon Lodal wrote:
> 
> Jeg sidder lige og forsøger mig lidt frem med threads for første gang
> ... dybt mystificeret.
> 
> Mit program starter. Der er 1 thread; 1 process. Når jeg spawner en
> thread første gang, er der pludselig 3 threads med pid's på række. Jeg
> er godt klar over at threads er processer (med egen pid), men hvorfor
> er der 3?

Der er det oprindelige program, din nye tråd, og så en LinuxThreads tråd
til oprydning (spørg mig ikke hvad den laver) som vist sover det meste
af tiden.

> Er der et eller andet jeg skal gøre for at kunne debugge programmet?
> Jeg bruger ddd-3.1.6 (gdb-skal). Den går helt i stå første gang den
> kommer til pthread_create(); mister al kontakt med begge threads,
> siger noget om at programmet fik et ukendt signal (!), og prøver vist
> at finde en lokation i sigsuspend.c, men kan ikke finde filen. Jeg har
> prøvet at catche alle signals med sigwait(), og jeg har prøvet at
> blocke alle signals med sigprocmask(), men lige meget hjælper det.

gdb (som bruges af ddd internt) skal være patchet for at forstå tråde.
Versionen der fulgte med RH5.2 var vist, men i RH6.0 var den ikke..

Se http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html

Mvh Morten


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *