Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!cbmvax!thomas From: thomas@cbmvax.UUCP (Dave Thomas QA) Newsgroups: comp.sys.amiga.tech Subject: Re: Testing for disk (Lock?) Message-ID: <6287@cbmvax.UUCP> Date: 15 Mar 89 14:57:32 GMT References: <8903150738.AA12483@hermes.berkeley.edu> Reply-To: thomas@cbmvax.UUCP (Dave Thomas QA) Organization: Commodore Technology, West Chester, PA Lines: 42 In article <8903150738.AA12483@hermes.berkeley.edu> dillon@HERMES.BERKELEY.EDU (Matt Dillon) writes: > :> you would expect. The problem is that it prompts for DH0: if it is called > :> before the disk is mounted (the normal case). > :> > :> Is there a way to check for the existence of a device or directory and > :> not have a requestor if the check fails? > : > :Yep. In the process structure there is a field called pr_ConsoleTask. If it > :is set to -1 (I think) this will inhibit DOS requesters appearing for that > :process. > : > : struct Process *p; > : > : p = (struct Process *) FindTask (0); > : p->pr_ConsoleTask = (APTR) -1; > > Uh, that's a nice easy way to crash your machine ... it is actually > proc->pr_WindowPtr . Essentially, you should do this: > > APTR Save; > > Save = p->pr_WindowPtr; > p->pr_WindowPtr = (APTR)-1L; > > (do stuff that you don't want reuqesters for here) > > p->pr_WindowPtr = Save; > > -Matt OOPS! You're right...That's what I get for not looking in the include file. My memory seems to be going...Hope I didn't confuse anybody. Dave -- ============================================================================= Dave Thomas COMMODORE AMIGA TEST ENGINEERING // /_ |\/||/_ /_ UUCP ...{allegra,rutgers}!cbmvax!thomas \X/ / \| ||\// \ ============================================================================= Opinions expressed are my own...no one else wants them =============================================================================