theclapp

Search theclapp.blog-city.com

 

Listener shell infrastructure II

posted Thursday, 12-Apr-2007
I got the basic "run a command and send me the output" working. Now I have to make some design decisions (and write some more code, of course). Obviously(?) I want to do as much of the heavy lifting as possible on the Lisp side and leave the remote agent side (currently a 53 line Perl script) as simple as possible.

As an aside, I found the flow of data quite interesting. My test case was "ls" and it would sometimes dribble out output and sometimes spit out big chunks, but it was far from even.

Sample run:

CL-USER 40 > :server "localhost"
"localhost"

CL-USER 40 > :c "mkdir test-dir"
NIL

CL-USER 40 > :c "ls -l test-dir"
total 0
NIL

CL-USER 40 > :c "touch test-dir/a"
NIL

CL-USER 40 > :c "ls -l test-dir"
total 0
-rw-r--r-- 1 lmc lmc 0 Apr 12 21:52 a
NIL

CL-USER 40 >

Generating this sample run reminded me of a few things: I'll have to do some commands on the remote end, like "cd". And my error recovery sucks. :) All in good time.

tags:  

links: digg this    del.icio.us    technorati    reddit