On Thu, 2004-02-12 at 10:43, David Adams wrote:
> I am running the Bash shell and I ran the following and it failed:
>
> <cfexecute name="/bin/ls" arguments="-z 2>&1" variable="result" timeout="60"></cfexecute>
> <cfoutput>#result#</cfoutput>

Interesting... Try double checking that it will work from cf by doing
something like
<cfexecute name="/bin/ls" arguments="-z 2>errors.txt" variable="result"
...
and see if the error is indeed listed in errors.txt - btw this works
fine from the shell it's self - maybe there is a problem with java's
Runtime.getRuntime().exec (which I assume is what MM is using)

There might be a problem with the way stdin is read by cfexecute. And
the only way around it, that I can think of, would be to write a shell
wrapper script (which basically is the same thing you did with the perl
script - but wont require perl - btw your code never was posted)

Here is a simple bash wrapper script you can try (don't add the +---
---+ lines to the file):

+----- wrapper.sh ------+
#/bin/sh

`$*` 2>&1
+----- wrapper.sh ------+

then
$chmod u+x wrapper.sh

then call it like

<cfexecute name="wrapper.sh" arguments="/bin/ls -z" ...

I apologize I don't have cfmx on my workstation and at present I am only
working on gigs that are using windows boxes so I cant test it for you.

--
Vale,
Rob

Luxuria immodica insaniam creat.
Sanam formam viatae conservate!

http://www.rohanclan.com
http://treebeard.sourceforge.net
http://ashpool.sourceforge.net
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to