From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,e7a9a297667042f3 X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,e7a9a297667042f3 X-Google-Attributes: gidfee84,public From: JONESD@kcgl1.eng.ohio-state.edu (David Jones) Subject: Re: Multithreaded programs and RPCs Date: 1995/09/04 Message-ID: <42f657$oef@charm.magnus.acs.ohio-state.edu>#1/1 X-Deja-AN: 109471690 references: <4289kh$hv6@bcarh8ab.bnr.ca> organization: The Ohio State University newsgroups: comp.sys.dec,comp.unix.osf.osf1 In message <4289kh$hv6@bcarh8ab.bnr.ca>, smiller@bnr.ca (Scott Miller) writes: >I wrote a simple program that spawns off a thread to act as an RPC server. >It core dumps. However, if I spawn off a thread to do the 'main' loop, and >use the main thread to act as the RPC server, it (seems to) work. Why is this? >Can a non-first thread in a process act as an RPC server? Do I need to >compile/link with some different switches? > >ONC RPC, OSF1 V3.2, using cc options '-threads -lc_r -lpthreads'. I've also >thrown in '-lmach -lrpc -lrpcsvc'. Any clues? Most likely the RPC server function overflows the stack in your created thread. David L. Jones | Phone: (614) 292-6929 Ohio State Unviversity | Internet: 2070 Neil Ave. Rm. 122 | jonesd@kcgl1.eng.ohio-state.edu Columbus, OH 43210 | vman+@osu.edu Disclaimer: Dogs can't tell it's not bacon.