Date: Fri, 26 Oct 2001 06:33:19 -0500 From: "Martin G. McCormick" <martin@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Subject: Re: The system has no more ptys. Message-ID: <200110261133.f9QBXJR84735@dc.cis.okstate.edu>
next in thread | raw e-mail | index | archive | help
What appears to have happened is that every ttyp# file in /dev should be owned by root and in group wheel when not in use at which time it is owned by the uid of the user and in group tty as in crw--w---- 1 martin tty 5, 0 Oct 26 05:31 ttyp0 When I killed off those stuck expect scripts and sh processes, they never ended properly so the ttyp# ports didn't get restored to what they normally look like which is chmod 666 and owned by root in the wheel group as in crw-rw-rw- 1 root wheel 5, 2 Oct 26 02:00 ttyp2 Every single ttyp# on this system that wasn't owned by a fortunate few who stay logged in most of the time got left in a state where they were owned by root and in group tty as in crw--w---- 1 root tty 5, 16 Oct 24 15:13 ttypg This is because root called the scripts that failed. It turned out that /dev/MAKEDEV ttyp* was not useful in globally repairing the damage because those ttys all appeared to be serving customers. I ended up grepping /dev/ttyp* for all ttyp# ports that were stuck and using chmod 666 and chgrp to reset them to their proper state. My question is, was there a better and faster way to do this? I think this problem was several weeks in the making with a tty getting eaten each time a script got hung up. I certainly will try to raise the IQ of the expect script that caused this mechanized denial of service so that it can time out if something goes wrong, but that is neither here nor there. Is there an already existing way to recover ttys that are no longer serving the user who called them? Martin McCormick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110261133.f9QBXJR84735>
