[comp.sys.apollo] IOS_$DELETE question ...

krowitz@mit-kermit.UUCP (David Krowitz) (08/03/87)

I've been poking around with IOS trying to write a section of
code which delete a file after it has been processed. It seems
that I must have the file open for write-access before calling
IOS_$DELETE, but I can't always set write access since another
process may have the file open for reading. Can anyone give me
a pointer on how to implement a delete-when-unlocked feature
similar to the -DU option of DLF? I've tried using 
IOS_$SET_OBJ_FLAG to set the delete-on-close flag, but that
also seems to require that the file be opened for writing.


                                   -- David Krowitz

mit-erl!mit-kermit!krowitz@eddie.mit.edu
mit-erl!mit-kermit!krowitz@mit-eddie.arpa
krowitz@mit-mc.arpa
(in order of decreasing preference)

thompson@calgary.UUCP (Bruce Thompson) (08/05/87)

In article <8708031813.AA11609@EDDIE.MIT.EDU>, krowitz@mit-kermit.UUCP (David Krowitz) writes:
> I've been poking around with IOS trying to write a section of
> code which delete a file after it has been processed. It seems
> that I must have the file open for write-access before calling
> IOS_$DELETE, but I can't always set write access since another
> process may have the file open for reading. Can anyone give me
> a pointer on how to implement a delete-when-unlocked feature
> similar to the -DU option of DLF? I've tried using 
> IOS_$SET_OBJ_FLAG to set the delete-on-close flag, but that
> also seems to require that the file be opened for writing.

The best suggestion I can make is to try NAME_$DELETE_FILE. Presumably
you've got the pathname around somewhere. I can't guarantee that this
will work if the object's locked, but the NAME error codes don't say
anything about locked objuects. Best of luck.


	While I'm here, here's a question that's been bugging me for
some time. Can someone explain why it is that whenever the Cartridge
tape is active ALL activity on that node ceases? Here's the set-up:
We have a DN3000 with 73M disk and Cart. Partnered to this node is
a DN3000 mono. with no disk. When the Cart is active even PAGING from
the diskless node halts until the Cart stops! Any ideas why this is?

	Thankx,
	Bruce.

------------------------------------------------------------------------------
Bruce Thompson				| Disclaimer? But...but... I didn't
University of Calgary,			| say anything....really! Well,
Computer Science Department		| nothing of any interest anyways.
(403)220-3538 or (403)220-5109 (office)	|