Re: inetd question related to cvs (not usual pserver doesn't work FAQ)

2000-09-14 Thread Larry Jones

Laird Nelson writes:
 
 inetd programs are supposed to be able to simply read from STDIN,
 right?  I'm trying to write a wrapper program around cvs pserver that
 gets invoked, obviously, from STDIN.  I'd like to peek at the
 conversation between client and server, and I thought I could get at
 this conversation by simply reading from STDIN.  But my program blocks
 infinitely.  Is the cvs client/server protocol such that it is started
 by the server (the Cederqvist says no)?

I'm not entirely clear on what it is you're doing, but a program started
by inetd has the client socket as its STDIN and STDOUT.  If you're
trying to snoop on the traffic between the client and server, you'll
need to create another socket to use to communicate with the cvs pserver
and then you have to copy everything you read from STDIN to the pserver
and everything you read from the pserver to STDOUT.  This needs to
happen more-or-less simultaneously to avoid getting stuck in a deadly
embrace (e.g., you block trying to write to pserver which is blocked
trying to write to you).

Note that the simplest way to snoop on the traffic between the client
and server if you're just curious is to set the CVS_CLIENT_LOG
environment variable on the client side.

-Larry Jones

He piqued my curiosity. -- Calvin




RE: inetd question related to cvs (not usual pserver doesn't work FAQ)

2000-09-14 Thread TTaylor

An easier way to look at the pserver client/server dialog is to define the
CVS_CLIENT_LOG environment variable with the base file name for the log on
the client.  The client will create two files.  Everything that the client
sends to the server is logged in filename.in and everything from the server
is in filename.out.

This is documented in Cederqvist
(http://www.cvshome.org/docs/manual/index.html), specifically in
http://www.cvshome.org/docs/manual/cvs_19.html#SEC178

- Tim

 -Original Message-
 From: Laird Nelson [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 14, 2000 10:51 AM
 To: [EMAIL PROTECTED]
 Subject: inetd question related to cvs (not usual pserver doesn't work
 FAQ)
 
 
 inetd programs are supposed to be able to simply read from STDIN,
 right?  I'm trying to write a wrapper program around cvs pserver that
 gets invoked, obviously, from STDIN.  I'd like to peek at the
 conversation between client and server, and I thought I could get at
 this conversation by simply reading from STDIN.  But my program blocks
 infinitely.  Is the cvs client/server protocol such that it is started
 by the server (the Cederqvist says no)?
 
 In case it matters, my program is a perl program.  
 
 Cheers,
 Laird