Index: openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl,v diff -u -N -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl 28 Oct 2020 15:39:19 -0000 1.8.2.1 +++ openacs-4/packages/acs-tcl/tcl/proxy-procs.tcl 1 Nov 2020 17:58:21 -0000 1.8.2.2 @@ -16,11 +16,14 @@ ad_proc -public proxy::exec { {-call:required} {-cd} + {-ignorestderr:boolean} } { Execute the statement in a proxy instead of normal exec @param call Call which is passed to the "exec" command @param cd Change to the given directory before executing the command + @param ignorestderr Boolean value to indicate, whether the stderr output + of the exec'ed command should be ignored. } { set start_time [clock clicks -milliseconds] set handle [ns_proxy get ExecPool] @@ -39,7 +42,8 @@ set pwd [ns_proxy eval $handle pwd] ns_proxy eval $handle [list cd $cd] } - set return_string [ns_proxy eval $handle [list ::exec {*}$call]] + set exec_flags [expr {$ignorestderr_p ? "-ignorestderr --" : ""}] + set return_string [ns_proxy eval $handle [list ::exec {*}$exec_flags {*}$call]] } finally { if {[info exists pwd]} { # @@ -55,7 +59,11 @@ # Now rename exec; protect cases, where file is loaded multiple times if {[namespace which ::real_exec] eq ""} {rename exec real_exec} - ad_proc exec {args} {This is the wrapped version of exec} {proxy::exec -call $args} + ad_proc exec {-ignorestderr:boolean -- args} { + This is the wrapped version of exec + } { + proxy::exec -ignorestderr=$ignorestderr_p -call $args + } } # Local variables: