proxy::exec (public)
proxy::exec -call call [ -cd cd ] [ -ignorestderr ]
Defined in packages/acs-tcl/tcl/proxy-procs.tcl
Execute the statement in a proxy instead of normal exec
- Switches:
- -call (required)
- Call which is passed to the "exec" command
- -cd (optional)
- Change to the given directory before executing the command
- -ignorestderr (optional, boolean)
- Boolean value to indicate, whether the stderr output of the exec'ed command should be ignored.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set start_time [clock clicks -milliseconds] set handle [ns_proxy get ExecPool] if {[clock clicks -milliseconds] - $start_time > 5} { ns_log warning "ExecPool: getting handle took [expr {[clock clicks -milliseconds] - $start_time}]ms (potential configuration issue)" } ad_try { if {[info exists cd]} { # # We were requested to switch to a different # directory. Remember the old directory before # switching to the new one. # set pwd [ns_proxy eval $handle pwd] ns_proxy eval $handle [list cd $cd] } set exec_flags [expr {$ignorestderr_p ? "-ignorestderr --" : ""}] set return_string [ns_proxy eval $handle [list ::exec {*}$exec_flags {*}$call]] } finally { if {[info exists pwd]} { # # Switch back to the previous directory. # ns_proxy eval $handle [list cd $pwd] } ns_proxy release $handle } return $return_stringXQL Not present: Generic, PostgreSQL, Oracle