Xref: utzoo alt.toolkits.xview:184 comp.unix.programmer:1780 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!decwrl!fernwood!portal!gdc!nms!bergquis From: bergquis@nms.gdc.portal.com (Brett Bergquist) Newsgroups: alt.toolkits.xview,comp.unix.programmer Subject: Re: Is RPC servers in XView programs possible Message-ID: <249@wimpy.nms.gdc.portal.com> Date: 9 May 91 11:13:36 GMT References: <1991May7.140605.10783@resam.dk> Followup-To: alt.toolkits.xview Organization: General DataComm, Middlebury CT Lines: 43 andrew@resam.dk (Leif Andrew Rump) writes: > Hello world! > > I just want to hear some expert opinions (that's You) before I dig into > unknown land! > > I want to create an XView application that has a RPC server running as > a child process (so when the application terminates it brings the server > down). I'm thinking of creating a pipe before I fork the RPC server so > > Does it work? Any problems? Anything to look for? Anything... > > Andrew I'm currently doing something similar in a project that I am working on. In my situation, I need my XView application to be both a client of another RPC server, and a RPC server in its own right by using callback RPC methods. To handle this situation, I fork a separate RPC server process from the XView application to handle the callback RPCs. This server process communicates with the XView application through a pipe. The reason that I need a separate process is to eliminate a deadlock problem. My XView application issues RPC calls to another RPC server which when enabled issues callbacks to the forked RPC server. These callback RPCs can occur at anytime. When my XView application later makes a RPC call to the server, the server my be trying to make a callback RPC, and if this callback were to the XView application, a deadlock would occur, with both RPC calls timing out. Thus the separate forked RPC server. If all that you need is for a XView application to be an RPC server and it is not itself going to do RPC calls to any of its clients, then there is a XView function call which will enable RPC dispatching using the Notifier. It is "notify_enable_rpc_svc()". This function takes as its argument, "TRUE" to enable rpc dispatching, and "FALSE" to disable rpc dispatching. Hope this helps.-- Brett M. Bergquist, Principal Engineer | "Remind me" ... "to write an General DataComm, Inc., | "article on the compulsive reading Middlebury, CT 06762 | of news." - Stranger in a Strange Land Email: bergquis@nms.gdc.portal.com or ...!portal!gdc!nms!bergquis