Is RPC servers in XView programs possible

Brett Bergquist bergquis at nms.gdc.portal.com
Thu May 9 21:13:36 AEST 1991


andrew at 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
   <deleted stuff>
> 
> 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 at nms.gdc.portal.com  or ...!portal!gdc!nms!bergquis



More information about the Comp.unix.programmer mailing list