[comp.unix.ultrix] running a program as a shell vs. as a getty

jarrell@vtserf.cc.vt.edu (Ron Jarrell) (12/18/90)

We have an client/server type program we're developing locally.
Originally we had the server code installed as a shell in the passwd
file, and the client knew the username/password to the server.

To get to the server machine, the client uses a uucp-like series of
commands to connect through our local CBX to a DECserver-500, then
CONNECT to that machine, and login with the username/password pair.

This works just dandy, but does have the few second overhead of logging
in.

We figured, to streamline it, why not run it as a getty?  So I
dedicated one of the lat ports to offering a "server" service, and set
it up in the ttys file to run a front end to the server image.  The
modified client just gets to the ds 500, and now does a CONNECT SERVER
(where SERVER is a unique service name for this).  The "getty" running
in this case opens the lat port, does some dupfd's to set up stdin and
friends, then does an execl to the server image.  This code is pulled
pretty much directly from /usr/examples/lat/latdate.c on the 4.0
distribution.  The only difference is in WHAT we exec, and that we
	a) chdir to the "home" directory for the server, and
	b) DON'T set any tty modes. (The first thing the server does
	   is set all the tty modes it wants.)

This sounds like it should work just fine.  It doesn't.  The connection
happens just great, but the server operates spasticly, having long
pauses between bursts of data, like it wasn't getting time slices or
something.  We'e run back to back comparisons and the slowness of the
getty method (an order of magnitude) is consistent, even though the
processes are running the same code, and have the same niceness, etc.

The only difference is one is run as a shell by login, and one is a
getty.  Both are gotten to via the same ds 500.

Are we missing some critical piece of "gettydom"?  I'm stumped.