[comp.sources.d] Kermit on BSD 4.2

nerd@percival.UUCP (Michael Galassi) (12/28/87)

Hi,

	I'm recently wrote a program to deal with idle users on my
system and have a loose end to tie up before I can send it on to r$
for posting to comp.sources.unix.

	The problem is with kermit.  When users are kermiting files
back and forth stat(2) on their terminal shows that the device has
not been accessed since the file transfer started.  I know perfectly
well that data is going across the link as the lights on the modem
blink in the usual kermit fashion, but looking at the st_mtime,
st_atime, and st_ctime entries in the structure returned by stat(2)
shows no change during the course of the file transfer.  I know this
is not a problem with my invocation of the stat system call as
who(1) also reports the terminal as idle.  HELP!!!  How is kermit
doing its i/o?

	I am running C-Kermit version 4C, when it starts up I get the
message:

C-Kermit, 4C(057) 31 Jul 85, 4.2 BSD

	If anyone knows exactly how kermit does it's i/o could you
please send me mail about this?  Also, what other programs have you
found that play the same tricks with i/o that I should look out for?

	If you too are curious, just drop me a "me-too" message to
the address listed in my .signature, if there are a few of these I
will email summaries to individuals, if there are enough, I will
make a single posting to the net when I have all the details to
justify this.

	As an aside, if anyone in the vicinity (i.e. a connection
that is entierly composed of local calls) has a more recent version
of C-Kermit than the one specified above and is willing to email me
sources, please drop me a line.

	-michael

egisin@orchid.waterloo.edu (Eric Gisin) (12/29/87)

In article <1031@percival.UUCP>, nerd@percival.UUCP (Michael Galassi) writes:
> 	The problem is with kermit.  When users are kermiting files
> back and forth stat(2) on their terminal shows that the device has
> not been accessed since the file transfer started.  I know perfectly

C kermit probably opens /dev/tty instead of using stdin and stdout,
so the /dev/tty?? inode times are not updated.
The reason for doing this so one can send stdin or receive stdout as a file.

One fix is to modify kermit to use stderr instead of /dev/tty.