[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#46175: rpcgen manual page is incorrect



reopen 46175
thanks

On Wed, Feb 07, 2007 at 03:50:13PM +0100, Pierre HABOUZIT wrote:
> On Tue, Jul 06, 2004 at 12:22:23AM +1000, Hamish Moffatt wrote:
> > On Mon, Jul 05, 2004 at 07:58:49PM +0900, GOTO Masanori wrote:
> > > > The manual page for rpcgen says that rpcgen-generated servers background
> > > > themselves automatically on startup. With the example code (attached)
> > > > it does not. The same code does work as expected on Solaris 5.6 though.
> > > > 
> > > > Another annoying rpcgen feature is the way it expects server functions
> > > > to be named function_version_svc; on Solaris they're just
> > > > function_version (without _svc). So much for portability. I'm not
> > > > convinced this is a bug though so I won't file a proper report.
> > > 
> > > Where can I see the example code?  BTW, this bug seems being old; is
> > > your point still existed in the latest glibc 2.3.2.ds1-13?
> > 
> > Hmm. 5 years later I'm having a bit of trouble digging up the example
> > code! And I don't remember anything about rpcgen.
> > 
> > I found my uni assignment from 1998 where I used rpcgen, but I don't
> > think it ever compiled on linux, only Solaris. Some of the function
> > prototypes for RPC-called routines seem to be different, so it doesn't
> > compile.
> > 
> > I still can't see any sign that the generated program would fork()
> > though. See the following blah_svc.c file resulting from the following
> > (rpcgen blah.x):
> > 
> > program MESSAGEPROG
> >  {version PRINTMESSAGEVERS
> >    {int PRINTMESSAGE(string) = 1;
> >    } = 1;
> >  } = 0x20003198;
> 
>   In fact the manual page is correct, the § in question applies for when
> the rpcgen-erated code is able to deal with inetd, wich you can achieve
> using rpcgen -I.

Actually that paragraph describes both inetd and standalone operation:

       The  server created can be started both by the port monitors (for example, inetd or listen) or by itself.
       When it is started by a port monitor, it creates servers only  for  the  transport  for  which  the  file
       descriptor  0  was  passed.   The name of the transport must be specified by setting up the environmental
       [...]
       time and not at compile time.  When the server is self-started, it backgrounds itself by default.  A spe-
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       cial define symbol RPC_SVC_FG can be used to run the server process in foreground.

The marked section is not true.


Thanks,
Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>



Reply to: