Hi Lutz,
newLISP uses fgets for command IO, now there Is 1 specific problem
on every OS that uses newLISP together with 'process.
When you do a (process "cmd") or (process "sh") there is always a mixup
between the two command intepreters.
The problem is probably the use of 'fgets in all of them together with the
fgets in newlisp.c..
Now I was wondering if newLISP could fix this problem on its side?
I think its a matter of intepreting a "newline" or "eof" in newlisp..
(differenty from how a i.e. "cmd" or "sh" or "bsh" does...) while there is a fgets action in newlisp...
But im not yet sure how this could be fixed.. perhpas you have an idea? If you test the 'process above you will see the behaviour..
Regards, Norman.
Streaming IO in Newlisp (fgets) and command intepreters..
Streaming IO in Newlisp (fgets) and command intepreters..
-- (define? (Cornflakes))
If newLISP starts a process stdout of both processes go to the same window and they share stdin too. You can avoid this by assigning different I/O channels to the process you are starting using the pipe parameters in the 'process' command. See the 'process' command in the manual:
http://newlisp.org/downloads/newlisp_ma ... ml#process
The bc calculator example in the manual and pjot's gtk-server are examples of this procedure. Also runtk here:
http://newlisp.org/index.cgi?page=Tk_and_newLISP
does the same think with the Tcl/Tk shell.
Lutz
http://newlisp.org/downloads/newlisp_ma ... ml#process
The bc calculator example in the manual and pjot's gtk-server are examples of this procedure. Also runtk here:
http://newlisp.org/index.cgi?page=Tk_and_newLISP
does the same think with the Tcl/Tk shell.
Lutz