Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!fernwood!portal!cup.portal.com!DrBob From: DrBob@cup.portal.com (Robert A Rethemeyer) Newsgroups: comp.sys.amiga.tech Subject: Re: What does this guru mean? Message-ID: <32365@cup.portal.com> Date: 2 Aug 90 08:38:50 GMT References: <32034@cup.portal.com> <1431@madnix.UUCP> Distribution: usa Organization: The Portal System (TM) Lines: 31 In response to my question on guru# 87000004 265F48F1 in my tape handler, Randell Jesup, jesup@cbmvax.cbm.commodore.com writes... > You CANNOT make most dos calls (specifically those that cause packets > to be sent) from within a handler. The problem is that you have the process > port receiving asynchronous messages while Dos is trying to use it synchronou sly > to handle your dos call. and Aaron Avery, madnix!aaron@cs.wisc.edu writes... > Well, basically, you're doing something which is not allowed. It's not well > documented, but it's a no-no to call DOS functions from a DOS handler. > > The problem is that Write() is using the same message port that the handler > uses for its input and output. When the packets get inter-mingled, bad things > can happen. Thanks, this is the information I was looking for. It actually makes sense, once you think about it. I guess it didn't occur to me that Write() would be using the same port. So for Plan B, I will use another process to snoop the handler to find out what it needs to print. I'm learning this stuff as I go along. There is not much in the way of guidelines for writing handlers. The DOS TRM doesn't cut it. I've had to rely completely on example programs, the Transactor articles, and Trial and Error. This guru problem comes under the 'Error' category. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Bob Rethemeyer //"This is obviously some strange DrBob@cup.portal.com -or- // usage of the word 'safe' that I hadn't ..!sun!portal!cup.portal.com!DrBob // previously been aware of." - A. Dent