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

Home » Public Forums » archive » Re: SPAWN command bug
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
Re: SPAWN command bug [message #25306] Mon, 28 May 2001 20:45
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
LUH WILLIAM <luhw@ecf.utoronto.ca> writes:

> Hi, I'm having trouble with using really long commands with spawn. Here's
> an example:
>
> strCommand = '"c:\program files\spectral\spec.exe" ' + $
> string(x) + ' ' + string(y) + ' "' + strOutput + '"'
>
> where x = 25, y = 25 for example
>
> Now call Spawn, strCommand:
... remainder deleted...

Isn't there a limit to the number of characters in a DOS command? I
thought it was 127 or 128. This implies that no matter what you do,
you won't be able to execute a long command even to COMMAND.COM.
when you type it to a COMMAND.COM window?

Even if this limit has been enhanced under Win Me/9x, it's possible
that IDL is using some older, more limited version of the interface.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: SPAWN command bug [message #25310 is a reply to message #25306] Mon, 28 May 2001 16:21 Go to previous message
William Luh is currently offline  William Luh
Messages: 3
Registered: May 2001
Junior Member
I would also like to add that putting white spaces in the path is not the culprit. In case 1, everything works fine, even with the space in "program files".

Will
luhw@ecf.utoronto.ca

"LUH WILLIAM" <luhw@ecf.utoronto.ca> wrote in message news:Pine.SGI.3.96.1010528115530.104942202A-100000@skule.ecf ...
Hi, I'm having trouble with using really long commands with spawn. Here's
an example:

strCommand = '"c:\program files\spectral\spec.exe" ' + $
string(x) + ' ' + string(y) + ' "' + strOutput + '"'

where x = 25, y = 25 for example

Now call Spawn, strCommand:

Case 1:
-------
for strOutput = '.\OUT\output.dat', everything works fine.

Case 2:
-------
for strOutput =
'c:\program files\spectral\develop\debug exe\output\first\output.dat', I
get
this error message:

% XMANAGER: Caught unexpected error from client application. Message
follows...
% SPAWN: Error executing spawn command.
A device attached to the system is not functioning.

There appears to be no problem with SPAWN in case 1, and after I quit case
2, I can still call SPAWN without any complaints. I suspect it's because
the command string strCommand is too long, since for shorter strOutput it
works, however after reading the help for SPAWN, I did not find anything
about a limit on the string length of command. Are there any workarounds
to this problem?

Thanks,
Will
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to set path?
Next Topic: Re: process comunication

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

Current Time: Wed Oct 08 15:21:59 PDT 2025

Total time taken to generate the page: 0.00562 seconds