SPAWN error question [message #88714] |
Mon, 09 June 2014 12:34  |
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.)
|
|
|