jed-users mailing list

[2011 Date Index] [2011 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [Jed-users-l] "chat mode"?


On Fri 2011-05-20 (17:54), John E. Davis wrote:

> You might want to look at slang/slsh/lib/sldbsock.sl, which implements
> a sockets based interface form communicating with the slang debugger
> sldb.  

It's too complex for my problem (and actual slang knowlwedge) :-}

I do not have a bidirectional socket interface, but really two
single files (fifos): one for writing and one for reading.

The writing part should be easy. Here I have example code.
But how do I implement an asynchronous process which reads a file (fifo)
and writes its contens into a jed buffer, continously?

I have found open_process() but this starts an external program. 
I would like to have it implemented with slang, and no external code.

The algorithm should be:

create second window with output buffer
create subprocess:
  open output fifo
  loop {
    read line from output fifo
    write line to output buffer
  }
open input fifo
loop {
  read line from input buffer
  write line to input fifo
  write line to output buffer
}  

The input buffer is not stativ, but it is where I type lines.
The input and output fifos are already there.


-- 
Ullrich Horlacher              Server- und Arbeitsplatzsysteme
Rechenzentrum                  E-Mail: horlacher@xxxxxxxxxxxxxxxxxxxx
Universitaet Stuttgart         Tel:    ++49-711-685-65868
Allmandring 30                 Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.rus.uni-stuttgart.de/
_______________________________________________
Jed-users-l mailing list
Jed-users-l@xxxxxxxx
http://mailman.jtan.com/mailman/listinfo/jed-users-l


[2011 date index] [2011 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]