comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Running IDL through a unix pipe - obscure question

Running IDL through a unix pipe - obscure question
type: item
description: Hello there, I am using IDL for unix (Linux at the moment, but would want to use other versions later). I am spawning a child process from an IDL program and communicating with it via a pipe (i.e. spawn ...,unit=...). The child process is in fact another IDL program doing widgity type things designed to keep an eye on the progress of the parent while letting it get on with calculations. Is there a way for the child to find out if there is something to be read from the pipe. If I use READ then the child process will obviously hang until something comes along. I know that the manual (e.g. page 18-7U of the V4 manual) explicitly says that there is no way to do it in IDL. I have tried keeping my eye on FSTAT(0) but that doesn't change until things are actually read. I was wondering if there was a nifty unixy type thing I can do to find out if there is something waiting to be read (e.g. a call to ioctl?). Obviously, I could create a file as some sort of flag, but if I am going to do that, I might as well not bother with the pipe! I have briefly tried not using XMANAGER, but using WIDGET_EVENT directly with the YIELD_TO_TTY option, however that does not seem to work if the tty is a pipe. I have also tried using WIDGET_CONTROL,TIMER.. type events to interrupt a READ but they are not generated while READ is waiting. Bear in mind that the current version of Linux IDL does not support CALL_EXTERNAL, however, I will be moving to another unix platform before too long so I wouldn't rule out solutions that involve that. Many thanks in advance for any help, Nathaniel Livesey Jet Propulsion Lab, Pasadena, California, U.S.A.
creator: Nathaniel Livesey
date: 1996-04-11T07:00:00-00:00