Path: utzoo!mnetor!uunet!tektronix!tekgen!tekigm2!phils From: phils@tekigm2.TEK.COM (Philip E Staub) Newsgroups: comp.sys.amiga Subject: Re: Why is there a mount but no unmount? Message-ID: <2825@tekigm2.TEK.COM> Date: 13 Apr 88 20:05:06 GMT References: <4643@garfield.UUCP> <242@ssbell.UUCP> <6090@swan.ulowell.edu> Reply-To: phils@tekigm2.UUCP (Philip E Staub) Organization: Tektronix, Inc., Beaverton, OR. Lines: 41 Keywords: mount unmount path In article <6090@swan.ulowell.edu> page@swan.ulowell.edu (Bob Page) writes: >It's not trivial. In fact, it's like killing an Amiga process - since ^^^^^^^^^^^^^^^^ Boy you're not kidding. I'm playing with it now and it's a little like trying to get the worms back in the can: the only way is worm puree! >the system doesn't know all the resources the particular driver is >using, it can't clean them up. In adition to getting the code out of In fact that's exactly what you have to do: each mounted disk has it's own task which must be killed. >memory, you have to deal with restoring buffers, removing file locks, >mucking with the DOS device and name lists, and similar stuff. What It also needs to remove the interrupt server and free the signal bits for that task. >if you already have open files on the device? You get the picture. >The driver should do most of it, but there's currently no defined >protocol (or DOS packet) that says 'unmount yourself.' I toyed with the idea of sending a CloseDevice to the task (to close the *unit* through the message port). But to do that you need a pointer to the i/o request and the unit structure, and I'm not sure you can get there from here. Even then there's no guarantee that the close will expunge the handler task for that unit. Well, I'm still trying. I've got a quickie program running which unlinks the mounted device, but it doesn't free up all of the resources. Well, we'll see what happens. > >..Bob >-- >Bob Page, U of Lowell CS Dept. page@swan.ulowell.edu ulowell!page Phil -- ------------------------------------------------------------------------------ Phil Staub "I do NOT approve. I merely said I UNDERSTAND." tektronix!tekigm2!phils - Spock phils@tekigm2.TEK.COM