From owner-freebsd-questions Fri Jul 19 18:42:00 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA03007 for questions-outgoing; Fri, 19 Jul 1996 18:42:00 -0700 (PDT) Received: from relay-5.mail.demon.net (relay-5.mail.demon.net [158.152.1.48]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id SAA03001 for ; Fri, 19 Jul 1996 18:41:57 -0700 (PDT) Received: from post.demon.co.uk by relay-5.mail.demon.net id ay28329; 20 Jul 96 0:30 +0100 Received: from jraynard.demon.co.uk ([158.152.42.77]) by relay-3.mail.demon.net id aa26154; 19 Jul 96 23:36 +0100 Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.6.12/8.6.12) id VAA03861; Fri, 19 Jul 1996 21:19:30 GMT Date: Fri, 19 Jul 1996 21:19:30 GMT Message-Id: <199607192119.VAA03861@jraynard.demon.co.uk> From: James Raynard To: bala@cst.com.au CC: freebsd-questions@freebsd.org In-reply-to: <199607190705.RAA02664@skeg.cst.com.au> (message from Bala Periasamy on Fri, 19 Jul 1996 17:05:56 +1000 (EST)) Subject: Re: Killing processes Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>>>> Bala Periasamy writes: > > How to kill processes in the "D" state. You can't. D Marks a process in disk (or other short term, uninter- ruptible) wait. > Sometime it just hangs in the system. Unless I reboot I can't get rid of > the processes. This is because the process has made a system call, the information it wanted wasn't available immediately and the kernel has put it to sleep until it does become available. This sleep can be interrupted, but this is usually only done if the delay is of unpredictable length (eg waiting for a keypress on the terminal - the user may be talking to a friend, or even have gone home and forgotten all about the program). For something like reading from a disk, it's assumed that the delay should only last a fraction of a second and that it's not worth waking up the process. If this is a program you wrote yourself, you can use siginterrupt(3) to change this behaviour. -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk http://www.freebsd.org/~jraynard/