[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with spawn on Linux

ftjec@uaf.edu writes:
> Hello,
> I am having problems with the spawn command on Linux.  I am using the
> unit parameter to spawn to obtain a pipe to the child process and use
> this pipe to moniter the child's progress.  The code I have works fine
> on the sun I coded it for originally -- but on linux I get very
> unpredictable results.  Sometimes the process is spawned, yet no output
> is generated, sometimes it works fine, and sometimes it crashes idl
> completely with a "bus error" message.
> Does anyone know of a solution to this problem?
> Also any advice on the general state of idl on Linux would be greatly
> apprecated.

I can't reproduce your problem either:

RedHat 6.1
IDL> print, !version
{ x86 linux unix 5.2.1 Jun  4 1999}

What you describe is very strange.

However, I did discover that the ON_IOERROR procedure interferes with
reads from SPAWNed pipes.  In particular, ON_IOERROR occasionally
causes the input buffer to be lost (along with your data of course).
Usually this can be solved by moving ON_IOERROR outside of your read
loop, which in your case you have done already.  Perhaps you could try
CATCH just to see if anything different happens.


Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response