Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!basser!usage!troy@mr_plod.cbme.unsw.oz From: troy@mr_plod.cbme.unsw.oz (Troy Rollo) Newsgroups: comp.sys.apollo Subject: Re: DM editor as a process (Source Code included) Message-ID: <508@usage.csd.unsw.oz> Date: 3 Dec 89 00:28:55 GMT References: <109@crk56.bnr.com> Sender: news@usage.csd.unsw.oz Reply-To: troy@mr_plod.cbme.unsw.oz Lines: 16 From article <109@crk56.bnr.com>, by janick@crk56.bnr.ca (Janick Bergeron): janick> pad_$dm_cmd( stream, lineno, strlen( lineno ), &status ); janick> } janick> if ( wait ) pad_$edit_wait( stream, &status ); janick> exit( 0 ); janick> } It is more effiient to use pad_$create_window. There is one thing to be careful about with this sort of setup - the edit_wait function sometimes returns before the file has been unlocked and made available to other programs. Sometimes the process will return before the file is unlocked too, resulting in a file which cannot be reopened by the calling process. This can be cured by placeing a sleep(2) in front of the exit(0). ___________________________________________________________ troy@mr_plod.cbme.unsw.oz.au Make our greenies useful! The Resident Fascist Put them in the army!