From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!cernvax!cernvax.cern.ch From: paul@cernvax.cern.ch (paul burkimsher) Newsgroups: comp.lang.ada Subject: FORCEXIT VMS-Ada prog containing busy task - HOW? Message-ID: <5059@cernvax.cern.ch> Date: 25 Apr 91 15:44:45 GMT Sender: paul@cernvax.cern.ch Organization: CERN, European Laboratory for Particle Physics List-Id: How can I $FORCEXIT a VMS-Ada program that contains a task that's busy doing a text_io.get_line? I have a main processing task that wants to read from any one of several VMS mailboxes, whenever they have data to be read. Text_io.getline commits me to performing one particular MBX read that may not yet have data. I therefore bury each read inside a mbx_reader_task. The mbx_reader_tasks can now rendezvous (RV) with the main task whenever the readers actually have some data. So, the main task sits in a selective wait: LOOP ... SELECT ACCEPT RV_mbx1_reader( ... ); OR ACCEPT RV_mbx2_reader( ... ); OR TERMINATE; END SELECT ... END LOOP; The mbx1_reader_task is trivial (maybe mine is too trivial?): LOOP text_io.get_line(...); RV_mbx1_reader( ... ); END LOOP; My problem stems from the fact that from time to time, I wish to re-start the main program (which runs as a detached process). First, of course, I have to stop the existing detached process. I login and run a program which calls $FORCEXIT thus: forcex(STATUS => return_status, PIDADR => process_id_type(pid) ); Unfortunately, my wonderful program DOES NOT STOP and I have to do a $STOP/ID=nnnnnn in order to zap it. This is sad, as with STOP all my programs output files are NOT flushed and so I lose lots of output data (ie all of it). I believe $FORCEXIT would flush first. Am I right? How can I achieve what I am trying to do, ie close down a tasking program and also close it's output files gracefully? I suspect that my program does not stop bacause of the reader task that hasn't had a chance to execute "OR TERMINATE" (but I may be wrong). This is a long standing problem that I can't avoid any more. Any help MUCH appreciated, THANKS!!! Paul Burkimsher European Laboratory for Particle Physics, CERN CH-1211 Geneva 23 Switzerland Tel: +41-22-767-4915 Fax: +41-22-767-3900 paul@vxcern.cern.ch paul AT cernvax (BITNET) ...!uunet!cernvax!paul (UUCP) vxcern::paul (HEPNET) (22.190=22718) paul%cern.cernvax@uk.ac.ean-relay (Janet)