From owner-freebsd-questions Wed Jan 24 15:48:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id AF65537B402 for ; Wed, 24 Jan 2001 15:48:01 -0800 (PST) Received: (qmail 14789 invoked by uid 100); 24 Jan 2001 23:48:01 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14959.27057.74445.706622@guru.mired.org> Date: Wed, 24 Jan 2001 17:48:01 -0600 (CST) To: "David M. Smith" Cc: questions@freebsd.org Subject: Re: Application execution. In-Reply-To: <71475114@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG David M. Smith types: > I would like the two applications to be able to utilize several shared > procedures. No problem, I setup and I am using a shared library. > > Here is the problem. I would really like to have app2 pass a > procedure's address to app1 and thus allow app1 to use the callback (for > app2) when specific events occur. I don't think you can safely pass addresses around like that. Just because the physical memory for a library is shared doesn't mean that the library is mapped into the same place in the address space of all processes that use it. I may have that wrong, in which case I'll be corrected quickly - but would like the correction to include a pointer to implementation details, because I've got questions in that case! Well, there is an exception - if you can arrange to get app1 and app2 running on different threads of the same process, you can do this. That also makes sharing code a lot easier. > I have been unable to locate any information regarding execution of an > application, address space or call-back handling. If you have any > reading suggestions please let me know. The simple solution is probably rpc. Check the rpc(3) man page for information on how to use that. Personally, I skipped that and just use CORBA. You'll have to install an ORB from the ports tree. If you're using more than one language, you may need more than one ORB. The serious upside of this is that, once you've got it set up, you can debug CORBA objects in an interactive interpreter. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message