[comp.sys.amiga] Locked PRT:

FYS-MA@FINTUVM.BITNET (Matti Aarnio) (02/17/88)

[[ Forwarded from I-AMIGA -list on BITNET, USENET comments wellcome.
   I will get them via EMAIL or via this newsgroup.
       /Matti Aarnio (co-owner/feed moderator of I-AMIGA -list on BITNET) ]]

Date:         Tue, 16 Feb 88 19:51:00 CST
From:         MARKV@UKANVAX
Subject:      Locked PRT:

>...get a locked PRT: after reboot, maybe it writes to disk...

I don't buy it.  I just rebooted, copied the Devs drawer to RAM:DEVS
and did assign devs: ram:devs.  I did an exectue workram (which puts
minimal CLI commands in RAM:C and does assign c: ram:C  ie: cd makedir
dir list info type format delete copy rename )  I then did a
'dir >prt: ram:'.  The workbench disk was NOT accessed (If fact
my *only* drive was empty to be sure.  If you may have noticed, when you
do multiple prints close togather (so that the printer.device) is still
in memory, the disk isn't accessed.  So this isn't your problem.

I think AmigaDOS  most definitely DOES reset objects in use.  Try this:
make a directory with some files in it.
-try to delete the directory.  You'll get 'dir not empty'.
-go into the directory and delete the files.
-go back out and delete the directory.  I won't work (usually) because
 you will get 'object in use'.  You will always get it if you try
 a workbench discard for the initial delete.  You now have an object locked.
-reboot.
-try again to delete it, it works.

I realize there is a BIG difference between a device and a file to us.  To
DOS there is very little difference.  In fact I believe that redirection
commands open a file with that name,  if it happens to be a device DOS really
isn't aware of the difference.  So what is happening?  I really can't say
except that prt: is still open (remember, for us an 'object in use' error
is really DOS saying the file is still open.  Which leaves us without why
is it happening?  Any suggestions out there?

There is a possible fix.  DOS maintains some kind of list of openfiles, it
should be possible to check this list and close the files.  This is a kludge
because this *shouldn't* happen.  By the way, in a year and a half I have
NEVER had a device lock up because it was still in use except when it was
possessed by a task that wouldn't let it go and that I couldn't kill.

Speaking of Killing tasks.  A LOT of programs out there hang forever.  Is
there a way to "murder" a hung task?  I know we couldn't get it's memory
back, but it should be possible to get any resources back and tell
intuition it's gone.  Most people have extra memory and would rather
lose some bytes for a while than have to reboot to get back a locked
serial port, etc.

-Mark Gooderum
 University of Kansas
 MARKV@UKANVAX.BITNET

Sorry for the quick finish but I just got a message that this VAX is a
 goin' down..
.