Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!sdcsvax!ucbvax!LBL.ARPA!nagy%warner.hepnet From: nagy%warner.hepnet@LBL.ARPA.UUCP Newsgroups: comp.os.vms Subject: RE: SMG routines / Broadcast Messages / ASTs Message-ID: <870912090411.025@Lbl.Arpa> Date: Sat, 12-Sep-87 12:04:11 EDT Article-I.D.: Lbl.870912090411.025 Posted: Sat Sep 12 12:04:11 1987 Date-Received: Sun, 13-Sep-87 08:33:39 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 29 >I want to use the SMG$ routines for both input and output. I also want >to trap and retrieve broadcast messages using the SMG$SET_BROADCAST_TRAPPING >routine. When the broadcast AST goes off, I want to retrieve the messages >and write them to the screen using the SMG routines. The problem is that >if the program is in the SMG routines when the trap goes off, I end up >calling the SMG routines recursively and the program aborts. Nope, we ran into the same problem. In fact, a bit of research turned up the following: It is important to note that Screen Management procedures are not AST reentrant. on page 3-24 (second sentence of section 3.9) in the Run-Time Library Routines Part I and Part II Through LIB$. The bedevilment is that Digital's own examples in the manuals - see the example with the SMG$DISABLE_BROADCAST_TRAPPING on page RTL-590..595. Don't you just want to scream :-) Our solution to such things has been to use the AST routines to set flags or queue "event buffers" in a processing queue and then wakeup the main routine (which is usually $HIBERing). This seems to work quite well. = Frank J. Nagy "VAX Guru" = Fermilab Research Division EED/Controls = HEPNET: WARNER::NAGY (43198::NAGY) or FNAL::NAGY (43009::NAGY) = BitNet: NAGY@FNAL = USnail: Fermilab POB 500 MS/220 Batavia, IL 60510