Yeah it seems that the stream to the file is still opened and it has the
file locked, it will wait 30 (I assume seconds) and then time out so I
changed it to 155. :(
Neil
----- Original Message -----
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 11, 2002 4:34 PM
Subject: Re: CFexecute
> I haven't run into this. I was just working on a template yesterday using
> cfexecute exactly like yours. I capture the output of a command-line
> program to a file. In this case, the particular program only generates
> output if it encounters an error, so I immediately read the file and
display
> an error message only if the file isn't empty. Haven't seen a problem
with
> locks.
>
> You might try the following, which should do the same thing as your code:
>
> <table border="1" cellspacing="0">
> <tr><td><strong>Output:</strong></td></tr>
> <tr><td><pre><cfexecute name="command" arguments="arguments"
> timeout="155"></cfexecute></pre></td></tr>
> </table>
>
>
> Jim
>
>
> ----- Original Message -----
> From: "Neil H." <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, January 11, 2002 1:09 PM
> Subject: Re: CFexecute
>
>
> > <cfset outfile=GETTEMPFILE("C:\temp\","MH")>
> >
> > <cfexecute name="command" arguments="arguments" outputfile="#outfile#"
> > timeout="155"></cfexecute>
> >
> > <cffile action="READ" variable="stdout" file="#outfile#"><Br>
> > <table border="1"
> > cellspacing="0"><tr><td><strong>Output:</strong></td></tr>
> > <tr><td><cfoutput><pre>#stdout#</pre></cfoutput></td></tr></table><Br>
> >
> > This all looks ok. I was getting errors that the file was still locked.
> >
> > Thanks,
> >
> > Neil
> >
> >
> > ----- Original Message -----
> > From: "Jim McAtee" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Friday, January 11, 2002 2:36 PM
> > Subject: Re: CFexecute
> >
> >
> > > I think you may have it backwards. If the timeout attribute is
missing
> or
> > > set to '0', then CF will spawn the executable and return immediately.
> In
> > > that case, you can't be sure the output file will exist yet, or that
the
> > > spawned program has finished.
> > >
> > > If CF returns before the timeout lapses, then the program it launched
> > should
> > > have completed and the output file should be closed. If you just want
> to
> > > display the output of the program in-line, then set a sufficiently
large
> > > timeout value. It's a maximum value, so it doesn't matter much what
you
> > set
> > > it to, as long as you're certain the program can complete in that
time.
> > > Then _don't_ specify an outputfile attribute and CF will display the
> > results
> > > on the generated page.
> > >
> > > Jim
> > >
> > >
> > > ----- Original Message -----
> > > From: "Neil H." <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Friday, January 11, 2002 11:10 AM
> > > Subject: CFexecute
> > >
> > >
> > > > timeout attribute. I have the case where I want to display the
output
> > > from
> > > > the temporary file. The problem is the file is still in use (i.e.
CF
> > runs
> > > > too quick :) ) Anyway I can specify a timeout in the cfexecute tab,
> but
> > > is
> > > > there a maximum OR is there like a default like 0 which will wait
> until
> > > its
> > > > finished?
> > > >
> > > > Thanks,
> > > >
> > > > Neil
> > > >
> > >
> >
>
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists