Unkillable processes

Seth H Zirin seth at megad.UUCP
Thu Apr 25 07:20:40 AEST 1985


> I have seen several times in the past years, processes which cannot
> be killed on UNIX. I have been told that one of two things can be
> happening. One, the process is waiting on a non-existant wait channel, or
> two, the process is running with a negative priority level.

A process sleep()ing with a lower (more attractive) priority than the constant
PZERO ignores signals, and cannot be awakened other than with a wakeup() call.
Since kill()ing a process involves sending it a signal, a process is unkillable
if it is sleeping below PZERO.  There are several places in most Unix kernels
where a process will sleep like this.

The solution:

	(1) Trick the process into waking up somehow.
	(2) Use adb on /dev/kmem to change the priority to (PZERO + 1)

Once the process is running or has a higher (less attractive) priority than
PZERO, it will obey a number nine.  Bear in mind that if a process is sleeping
below PZERO there is probably a reason for it, and kludging it awake may
make your kernel nauseous.
-- 
-------------------------------------------------------------------------------
Name:	Seth H Zirin
USmail:	Megadata Corp. 35 Orville Dr., Bohemia, NY 11716
Phone:	516-589-6800 (M-F 9-5 EST)
UUCP:	{decvax, ihnp4}!philabs!sbcs!megad!seth

Keeper of the News for megad



More information about the Comp.unix.wizards mailing list