From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,c901133e3f78f6c9,start X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-27 15:26:19 PST Path: nntp.gmd.de!xlink.net!fauern!news.th-darmstadt.de!zib-berlin.de!prise.nz.dlr.de!news.dfn.de!swiss.ans.net!europa.eng.gtefsd.com!news.mathworks.com!news2.near.net!das-news2.harvard.edu!cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!andrew.cmu.edu!postman+ From: Miles_Krivoshia@transarc.com Newsgroups: comp.unix.osf.misc Subject: Re: HELP: Question on DCE Threads Date: Thu, 27 Oct 1994 18:26:19 -0400 Organization: Carnegie Mellon, Pittsburgh, PA Message-ID: References: NNTP-Posting-Host: po5.andrew.cmu.edu In-Reply-To: android@netcom.com (Pramod Kalapa) writes: > where open-file is the function to open the file. The creation routine > returns 0, which I assume is the valid value for a successful creation. > However, the thread doesn't enter the function "open_file". I've stepped > through the code with dbx and it just exits out of main. I've linked > with the thread-safe library libc_r.a > Can someone please e-mail me as to what I might be doing wrong ? Yes, while the new thread starts, them main thread keeps running, and when main exits, the whole process may end (implementation dependent). Try calling pthread_join() in main. -Miles