On Tue, 2011-03-15 at 05:33 -0400, Mark Wendt wrote: ... snip > > I have a shell script called config_modio that contains: > > " > > cd /home/kwallace/emc2/homann/modio_config > > halrun -I h_modio_config.hal > > Make sure there's no CR/LF after the h_modio_config.hal. If that > doesn't fix it, try "exit" with no quotes as your last line. I think > you forgot the "-f" switch to call out the <filename>. > > "
Thanks for your reply Mark. I don't think -f is an issue because the needed files get found and used. The -I is required in order to hold the terminal window or halrun open. The pyVCP application is spawned by the terminal or halrun so if it closes the app closes. The -I option tells halrun that while the app is running, I also want to interact with the app using halcmd on the terminal, which might include opening and closing other apps. So, when my app closes, the halcmd prompt remains because I told it to by using -I (?). I think the -I option is a bit of a cheat in this situation, and the real solution hasn't been created yet. Another option (-k for kill?) might be one that tells halrun to close if the app closes or find a way to have the app survive after the terminal closes. The latecy test app does this. > > I then created a launcher that calls the config_modio script. From the > > launcher, the pyVCP window comes up but the threads immediately stop and > > the keyboard locks up. I have to power off to reboot. If I invoke the > > script from a terminal, the pyVCP window works fine, but when I close > > the window, I am left with a halcmd: prompt, which I need to type exit > > to get back to the terminal prompt. > > Then just put "exit" with no quotes as your last line in the script. Do > you really need the halcmd prompt to come up? If not, you can leave out > the "-I" 'exit' had no effect because control isn't returned to the terminal command line until 'halrun' exits. For -I, see above. > > I tried a bare bones LED pyVCP window with my launcher and it doesn't > > lock up the keyboard, but it flashes the LED window and immediately > > exits back to the desktop. > > > > I think the latency test launcher does what I need to do, but it is > > fairly involved and will take some time to figure out how it works and > > then pick out the juicy bits. > > > > I also need to go through my modio_config component to see where things > > get locked up. I think I need to make it more fault tolerant, especially > > when it is trying to set up the serial port, but doesn't succeed. It > > seems the -I option gets ignored from the launcher, so the window pops > > up, but disappears while the serial port is getting setup. When I run > > the script from a terminal, the -I option gets honored and all is well, > > except I get returned to the halcmd: prompt because I'm in interactive > > or -I mode. Or that's my story so far. > > If you leave out the -I option, you won't get the halcmd prompt. See above. The 'emc' script does what I need too, but it is even more complex than the latecy test script. I suppose much could be learned from unlocking 'emc's secrets. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
