Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › global variables
I need some help here…….
I am aware of 2 system defined global variables: HciConnName and HciSiteDir. Are there others? If so where would I find them?
David Coffey
David, from a tcl shell, type “info globals”.
tcl>info globals newBody tcl_rcFileName tcl_version argv0 argv tcl_interactive platformcap ClientServerMode auto_oldpath auto_path errorCode errorInfo platformcapdb auto_execs auto_index HciSiteDir HciRoot auto_pkg_index HciSite env HciProcessesDir tcl_patchLevel gdbmwrapper TfcUccLocations HciMasterSiteDir TCLXENV XtermPath tcl_prompt1 HciMasterSite argc HCI_Default_Encoding localInit _clPriv HciRootDir tclx_library tcl_library tcl_platform
-- Max Drown (Infor)
What I am after is not found in the list. Is there a way to derive the process name a thread is running under?
Use this global variable: HciProcessesDir. The process dir always matches the process name.
What I am returned when calling this variable is the parent directory for all the processes in a site:
F:/healthvision/cis5.8/integrator/david/exec/processes
I am looking to get the actual process name the thread is running under.
Since the process runs in it’s own directory I can use [file tail [pwd]] to back into the actual process name.
set process [file tail [pwd]]
is the most direct way I know. The other way I’ve seen it done is:
set process “[lindex [split [pwd] /] end]”
Oops, my bad, HciProcessesDir would not give you what you need. The pwd command is the way to go.