bidirectional pipes in SunOS [message #1538] |
Mon, 29 November 1993 10:27 |
thompson
Messages: 584 Registered: August 1991
|
Senior Member |
|
|
I'm passing this question on for somebody else who doesn't have news access.
This person has software that runs on DEC Ultrix workstations that require
being able to pass data back and forth through a pipe between IDL and Fortran.
He has run into difficulty running this software under SunOS. Apparently the
pipe freezes.
The following simple routine illustrates this problem:
pro testidl
spawn,'a.out',unit=pipe,/noshell,PID=pid
for i=0,49 do begin
printf,pipe,i
readf,pipe,fred
print,'Value read from Fortran was ',fred
endfor
end
where the Fortran program (compiled into a.out) reads as follows:
integer*2 n
do i=1,50
read (5,*) n
write (6,*) n*2
enddo
end
When one tries to run the TESTIDL procedure on the Sun workstation, it freezes.
Apparently it doesn't do that on the DEC Ultrix workstation. As far as I can
tell, the Fortran routine is stuck waiting for input.
I'm not personally familiar with this aspect of IDL. Can anybody suggest how
to make pipes like this work under SunOS?
Thank you,
Bill Thompson
|
|
|