On Sun, 26 Aug 2012 06:32:15 +0200, Michael Haberler wrote: > Am 26.08.2012 um 01:11 schrieb Chris Morley: > >> >> >>> 3. ALL guis, not just Axis, need to eventually learn how to start a >>> POSTGUI_HALFILE if there is any chance itself or a subprocess creates >>> additional HAL objects. To do so, they need to understand that they >>> are the primary UI component. This suggests a per-ui command line >>> flag like '--primary-ui'. >> >> >> AXIS, TOUCHY and The future Gscreen all understand POST_GUI. >> TOUCHY requires a touchy.hal file though. >> It would be nice if linuxcncTK could be retrofitted with POSTGUI and >> at least PYVCP panels. >> but TCL is not my bag.... > > I think by now the whole POSTGUI_HALFILE thing was a kludge. The > linuxcnc.in assumption is: shutdown happens when the UI program > exits, > so just block on the UI program, and run cleanup thereafter. > > It would be much easier and uniform if: > 1. linuxcnc.in just starts the UI in the background and records its > pid > 2. linuxcnc.in waits for the UI to be fully set up (all HAL > comps/pins created and ready) > 3. linuxcnc.in runs any POSTGUI type jobs. > 4. when done, it explicitly waits for the UI pid. > > 1,3,4: easy > 2: I'm taking suggestions - one cant tell in advance which halcomps > are set up behind the UI, so you cant test for them being ready > easily; also halcmd is less than helpful wrt exit status: say 'halcmd > show comp axis' always reports exit status 0 even if comp axis doesnt > exist. > > Maybe somebody has a simple idea in his bag of shell tricks how a > process can notify the parent shell that some step is complete.
The one thing that comes to mind is a trick that I learned with programming on Plan9 and p9 filesystem supported OS's (including Linux). Set up a synthetic OS and simply have the other programs open a known device (say /tmp/linuxcnc) and pass various commands like "ready" "pid" "kill"... I'm tempted to write some test code but I have to focus on on work for awhile, but might be able to after that. Actually if I think about it right, this may be related to a potential solution for some of the work I am doing on my theses and it might be an interesting test case... EBo -- ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
