Working with Named Pipes
While creating my latest examples for the JavaContest I faced the need
to communicate with my code from a program in IRIS to my Java code.
Communication with |CPIPE| worked as READ or WRITE but not both?
In the Documentation Named PIPEs are explained rather shortly.
"Once open, a pipe acts like an ordinary device." Not so precise.
I failed to achieve my expected READ/WRITE as TCP would offer.
Has anyone a working example to demonstrate it?
Any suggestion is welcome.
I found a workaround for my actual case.
Though I'm not so happy with it.
Product version: IRIS 2023.2
Command pipes (CPIPE) or Named Pipes (NPIPE)??
Any little, as simple as possible, test code of what you tested?
Enrico
CPIPE ../WRITE works here https://github.com/rcemper/java-global-editor
set cpipe="|CPIPE|1" ,cmd="cd /opt/irisapp/ && java gedi > g.log" open cpipe:(cmd:/WRITE) ;; later in loop use 0 read "?:",opt,! use cpipe write opt,! ;;;
With NPIPE I just was lost ,
OPEN hangs or has timeout....
no idea ; Could be the Ubuntu side in Docker was wrong.
I also did some experiments using netcat in my container.
Using Ubuntu pipe files works somehow. But it was not convincing.
Ubuntu experts may do it better.
I just learned here that "NAMED PIPE" is significantly different in
So my workaround (by accident) turns out to be better for my needs than the Linux FIFO feature
as I'm able also to read partial lines and don't need newlines or similar as separators.
it was kind of Lucky Punch