Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 1995 21:06:17 -0400
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        freebsd-hackers@freefall.cdrom.com
Subject:   Problem with pty's?
Message-ID:  <199506290106.VAA20304@ponds.UUCP>

next in thread | raw e-mail | index | archive | help

I've seen an interesting problem crop up with 2.0 and now with 2.0.5-RELEASE.

Let's say I log on, start X, start a console Xterm and run "vi" on
a file in it.

Then, lets say I don't stop the "vi" program; but kill the X server (or
else, the X server dies for some reason.)

Then, I log back on, start another console Xterm and guess what happens...
some of my keystrokes are going to that "vi" program that was (and still
is, for some reason) running on the previous Xterm, and some are going
to the shell which is now running on the pty.

I suspect that the SIGHUP which should have gotten to the "vi" isn't, or
else the "vi" isn't dieing for some reason.   Then, when I restart
the xterm, I happen to get the same pty; and that "vi" is still connected
to it (I would have thought setsid/setpgrp or something like that would
have disconnected the pty.)

I've seen this with 2.0.5-RELEASE twice, although since you don't have too
high a probability of getting the same pty; it can be hard to duplicate.
Also, I should add that I don't specify a pty limit in my CONFIG file, I
just have a line:

pseudo-device 	pty

with no digits... It was my understanding that caused a "lot" of ptys
to be available.

	- Ideas? -
	- Dave Rivers -




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506290106.VAA20304>