[comp.unix.internals] more help with 4.3 mod

gatesl@prism.CS.ORST.EDU (Lee Gates) (02/26/91)

-------
For those who missed the earlier discussion:

For my class, our group project is to make a BSD mod to 4.3 to be
able to kill a process (any process), and release its resources.

From my last posting, a few have pointed out that I was unclear,
probably because I am floundering in kernel terminology.

Anyways, the project has narrowed once again, and I wanted to bounce
it off the net.more.knowing.than.i.persons....  

Project:  Create a program that will take two arguments

	1.	Process ID to kill.  (discussed earlier)
	2.	Device to free up.   (ie /dev/printer)

The only resources we are really concerned about freeing up are the
serial devices, as the printers sometimes hang uninterruptably, and
the tape backup drive.

After reading a few of the responses I got from earlier postings, it
seemed that I could use the cyreset() syscall to reset the device
driver and free up the (serial) device.  Is this correct, other
responses I got said no, and there is some confusion here.

I was thinking that I could kill the process, then make the cyreset()
call to free up the resource, but then realized the kernel may query
the driver to see if it will accept the request.  Help me here, I
don't really have enough info to speculate.

I guess what it boils down to is that I can kill it, but I just
need to know how to reset the resource (given the filesystem name)
so that other processes can use it.

thanx to all have helped and will help.

-- lee
gatesl@prism.cs.orst.edu	 "having fun watching Oregonians rust"
------------randomly-chosen-drink/quote/simpsons'-quote---------------
"Give a hoot.  Read a book."
                -- Krusty in _Krusty_Gets_Busted_