Unix Programming - Re: Any "simple" way for a program running in an xterm window to

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2005 > Re: Any "simple" way for a program running in an xterm window to





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Any "simple" way for a program running in an xterm window to
Jack Masters

2005-04-12, 2:51 am

Norm Dresner wrote:
> Any number of times I've found myself yearning for the old MS-DOS PC's
> multiple video pages using EGA/VGA output cards. I have written, for
> example, a whole series of very useful and complex real-time control
> programs that use up to 8 simultaneous video pages for which the program has
> to do nothing more to put something on a secondary page than to copy the
> text & attributes to a different area of video memory than is used for the
> primary page and the video memory for all pages exists simultaneously and
> the program need do nothing to create them.
>
> In *NIX systems I know how to write separate programs which receive input
> either via a pipe or IPC messaging (or I guess shared memory too) but I was
> wondering if there's something I've overlooked in getting a text-based
> program in an xterm shell window to open a second window for (at least)
> output?
>
> TIA
> Norm
>

Somewhat less simple, but more flexible: in some of our control systems
we use shared memory segments (man shmget), where the main controllers
keep status info, and ncurses-based display processes that attach to the
same shm segment. The display process can be started by hand, or by one
of the many ways mentioned in previous posts.
Advantage of this is that the main controller is kept relatively free of
debugging code, and you can change display options without having to
take it down. Disadvantage is that the controller has to update status
regularly, using some form of locking mechanism to prevent a display
process from reading inconsistent state.

J.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com