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

Home » Public Forums » archive » SPAWN error question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
SPAWN error question [message #88714] Mon, 09 June 2014 12:34 Go to previous message
Chip Helms is currently offline  Chip Helms
Messages: 24
Registered: November 2012
Junior Member
Hi all,

So I recently had SPAWN throw an error that I haven't had before, namely:

IDL> spawn, 'wgrib2 -s '+filename+' | awk -F: ''{print $4 $5}''', inv
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_ZPEOzs
Too many open files
% SPAWN: Error managing child process.

As best I can determine, the error appears to have been caused by me exceeding my disk quota (hence not being allowed to write to files). Clearing up some space and restarting the IDL session seems to have solved the issue (for whatever reason IDL didn't seem to recognize that I could once again write files until I restarted it).

My question is, why does spawn need to write a file? One thought I had was that maybe it was creating a named pipe, but I'm leaning towards that not being the case based on some testing I did. Here's a list of what I've tried and the resulting error messages:

IDL> spawn, 'ls'
% SPAWN: Error managing child process.
Too many open files

IDL> spawn, ['ls'], /noshell
% SPAWN: Error managing child process.
Too many open files

IDL> spawn, 'ls', tmp
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_SDxSTx
Too many open files
% SPAWN: Error managing child process.

IDL> spawn, ['ls'], tmp, /noshell
% SPAWN: Error opening file. File: /usr/tmp/idl_tmp_mY5lwC
Too many open files
% SPAWN: Error managing child process.

IDL> spawn, 'ls', unit=unit
% SPAWN: Unable to make pipe.
Too many open files

IDL> spawn, ['ls'], /noshell, unit=unit
% SPAWN: Unable to make pipe.
Too many open files

The fact that the error specifically mentions being unable to create a pipe when I tell it to use a bidirectional pipe is why I doubt my initial suspicion that the original error was pipe related. Any insight would be greatly appreciated.

Cheers,
Chip

(P.S., for those finding themselves using spawn often, the /noshell option significantly decreases the execution time at the expense of not automatically parsing the command line. Thus 'ls -lht' must be written as ['ls','-lht']. I've had improvements of an order of magnitude in execution time.)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idlneturl question
Next Topic: Spline returns NaN values

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

Current Time: Wed Oct 08 13:32:43 PDT 2025

Total time taken to generate the page: 0.00399 seconds