comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Problems with spawn on Linux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problems with spawn on Linux [message #18304] Wed, 15 December 1999 00:00
ftjec is currently offline  ftjec
Messages: 5
Registered: June 1998
Junior Member
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.

Thanks --
Jay
ftjec@uaf.edu

I wrote a simple test program to trick this problem:

pro foo
tmpstr = "the quick brown fox jumped over the lazy dog"
unit = 69

on_ioerror, io_err
i = 0

while ( 1 eq 1 ) do begin
i = i + 1
print, "Working on " + string(i)
spawn, 'ls ', unit=unit, /SH


;-- EOF of a pipe appears to be always FALSE. Strange.
;-- Just used to check that output was generated.
while ( EOF(unit) eq 0) do begin
readf, unit, tmpstr, format='(a)'
print, tmpstr
end

goto, done
io_err:
free_lun, unit

done:
if ( i > 10 ) then goto, finished
end


Here is the output on the sun machine:
Working on 1
foo.pro
init
status_watch.pro
Working on 2
foo.pro
init
status_watch.pro
Working on 3
foo.pro
init
status_watch.pro
Working on 4
foo.pro
init
status_watch.pro
Working on 5
foo.pro
init
status_watch.pro
Working on 6
foo.pro
init
status_watch.pro
Working on 7
foo.pro
init
status_watch.pro
Working on 8
foo.pro
init
status_watch.pro
Working on 9
foo.pro
init
status_watch.pro
Working on 10
foo.pro
init
status_watch.pro
Working on 11
foo.pro
init
status_watch.pro


On the linux box -- Note that everything after the 4th spawn is just
failing and not generating any output. It always appears to fail, but
not always at the same spot. Some times idl just crashes and dumps me
back to my shell.

Working on 1
foo.pro
init
status_watch.pro
Working on 2
foo.pro
init
status_watch.pro
Working on 3
foo.pro
init
status_watch.pro
Working on 4
foo.pro
init
status_watch.pro
Working on 5
Working on 6
Working on 7
Working on 8
Working on 9
Working on 10
Working on 11






Sent via Deja.com http://www.deja.com/
Before you buy.
[Message index]
 
Read Message
Previous Topic: Breakdown after 10 min: IDL + WinNT
Next Topic: Re: XOR graphics

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 09:00:55 PDT 2025

Total time taken to generate the page: 0.01106 seconds