[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modifications to "tait's" command interface




Michael and all,

If any of this sounds dumb please yell 
now, not later....

I'm working on Michael's real-time driver called "tait".
I should have it reading from a socket and a config file
soon and then a it's commands made available from Tcl.
(I want to add a full programming language to the Mk IV
comand set.)

One thing I want to remove is the way tait closes, moves
and open's it's command file with every access.  I can
guess why this was done but it won't work.  Surprizingly,
If I am writing to a file while at the same time you are
reading it you can close the file move it and reopen it
and I can continue writing all the while and not notice.

What really needs to be done is to "stat()" the file to 
detect if a writter is messing with the file.  (See the
source code to "tail" for exampe.)  Either that or ignor
the problem and simply aviod writing to command files as
they are being read.  I think the later is reasonable.

There is good reason to write to the command file while
tait is running but with a socket interface it is a lot
cleaning.  The writer would be on the other end of the socket.

So with the above as backgound, here is what I 
propose to do:

Tait will 
  1) Read a file called ".tait.rc" if it exists.
  2) Read and process any filenames it finds on the
     command line.  I will alow any number.
  3) After the above if the -i option was given open,
     wait for then read any commands on a socket,
  4) If no filenames on the command line AND the -i
     option was not given then read commands form STDIN.

In addition STDIN may be directly specified by using the
special filename of dash "-" on the command line.  Note
the the UNIX tar command and other do this too.

The TCL interpeter will connect via a socket to tait and
send data that "looks" just like what could be read from
a command file new line characters and all.

After this perhaps someone could write a CGI script in Tcl
or possibly a GUI in Tk... But later.


=====
Chris Albertson 
  Home:   310-376-1029  chrisalbertson90278@yahoo.com
  Cell:   310-990-7550
  Office: 310-336-5189  Christopher.J.Albertson@aero.org

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com