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

Home » Public Forums » archive » logical units unavailable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
logical units unavailable [message #9014] Sat, 24 May 1997 00:00
williams is currently offline  williams
Messages: 7
Registered: March 1997
Junior Member
I have a program which spawns some c-code, then reads its output. I
use the "spawn" command with /get_lun, as in:
IDL> spawn,cmd,unit=lun,/get_lun

After I've read the results, I use "free_lun" to free the logical
unit:

IDL> free_lun,lun

I find that when I've run this spawn that I get the error:

% SPAWN: All available logical units are currently in use.

Which is crazy, since every use of a lun frees it also. What is up
with this? Is there any way to release all logical units without
exiting IDL and loosing all the work I've done?

Thanks,
Daniel Williams

--
+----------------------------------------------------------- ------------------+
|Daniel L. Williams | Email: williams@srl.caltech.edu |
|Space Radiation Lab| Telly: 818/395-6634 |
|Caltech 220-47 | Fax: 818/449-8676 |
|Pasadena, Ca 91125 | WWW: http://www.srl.caltech.edu/personnel/williams.html |
+----------------------------------------------------------- ------------------+
Re: logical units unavailable [message #9015 is a reply to message #9014] Fri, 23 May 1997 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
[This followup was posted to comp.lang.idl-pvwave and a copy was sent to
the cited author.]

Danial Williams writes:

> I have a program which spawns some c-code, then reads its output. I
> use the "spawn" command with /get_lun, as in:
> IDL> spawn,cmd,unit=lun,/get_lun
>
> After I've read the results, I use "free_lun" to free the logical
> unit:
>
> IDL> free_lun,lun
>
> I find that when I've run this spawn that I get the error:
>
> % SPAWN: All available logical units are currently in use.
>
> Which is crazy, since every use of a lun frees it also. What is up
> with this? Is there any way to release all logical units without
> exiting IDL and loosing all the work I've done?

I don't know exactly what is going on here, but the use of
the Get_Lun keyword on a Spawn command is highly irregular.
I know the Spawn command uses the procedure Get_Lun to get
a unit (which is why you use Free_Lun to free it), but I've
never seen it called this way. (I don't have a UNIX machine
to see if it even works.)

In any case, CLOSE, /ALL will close and free any logical
units that are still open.

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NEW *.wav *.ra *.aif EFFEKTE MM SOUNDS FREE !!
Next Topic: Using Errorf in IDL

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

Current Time: Wed Oct 08 19:10:00 PDT 2025

Total time taken to generate the page: 0.00667 seconds