From owner-freebsd-questions Sat Jun 22 09:33:10 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA17235 for questions-outgoing; Sat, 22 Jun 1996 09:33:10 -0700 (PDT) Received: from post.io.org (post.io.org [198.133.36.6]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA17213; Sat, 22 Jun 1996 09:33:04 -0700 (PDT) Received: from zap.io.org (taob@zap.io.org [198.133.36.81]) by post.io.org (8.7.5/8.7.3) with SMTP id MAA25836; Sat, 22 Jun 1996 12:30:04 -0400 (EDT) Date: Sat, 22 Jun 1996 12:31:03 -0400 (EDT) From: Brian Tao To: FREEBSD-QUESTIONS-L , FREEBSD-HACKERS-L cc: brian@mediacity.com Subject: Killing "unkilliable" processes waiting to drain tty Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Way back in the mists of time, Brian Litzinger wondered how one would go about killing a process that was stuck waiting for its tty to drain when exiting. Processes like that would look something like this: taob 18335 0.0 0.0 772 16 p6- IEs+ 15Jun96 0:00.31 -tcsh (tcsh) taob 16294 0.0 0.0 776 12 pe- IEs Sat05PM 0:00.29 (tcsh) taob 16315 0.0 0.0 1888 16 pe- IE+ Sat05PM 0:00.46 (pine392) You could kill -9 them all you want, but they would not go away. I didn't see any resolution to the immediate question of "How do I get rid of these processes, besides rebooting?" (search for "indestructible processes" in the freebsd-questions archives), and the problem still exists in the latest 2.2-SNAP. Anyhow, to make a long story short, try this: cat < /dev/ttyXX # replace XX as appropriate I don't know why I didn't try this before... it seems so blindingly obvious now. I was able to recover 7 tty's from a dozen stuck processes today. Phew. -- Brian Tao (BT300, taob@io.org, taob@ican.net) Systems and Network Administrator, Internet Canada Corp. "Though this be madness, yet there is method in't"