Check-in [ee6bad0d84]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More fix ups for logging from threads
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ee6bad0d84b5afb694979ae9151d4e3c63985ebd
User & Date: rkeene 2018-04-28 04:03:42
Context
2018-04-28
04:04
Need to also set baseEnvironment for threads Leaf check-in: 2a85db2588 user: rkeene tags: trunk
04:03
More fix ups for logging from threads check-in: ee6bad0d84 user: rkeene tags: trunk
03:10
Fixed logging when using fork check-in: 379773cfa6 user: rkeene tags: trunk
Changes

Changes to rivet-starkit/main.tcl.

1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150

				# Copy the appropriate namespaces to the new thread
				foreach ns [list ::rivetstarkit] {
					thread::send $threadId [list namespace eval $ns ""]
				}

				# Copy the appropriate variables to the new thread
				foreach var [list ::starkit::topdir ::rivet_cgi_tls_verified($sock)] {
					if {[namespace qualifiers $var] != ""} {
						thread::send $threadId [list namespace eval [namespace qualifiers $var] ""]
					}

					if {[info exists $var]} {
						thread::send $threadId [list set $var [set $var]]
					} else {
						thread::send $threadId [list unset -nocomplain $var]
					}
				}

				# Copy the appropriate procedures to the new thread
				foreach proc [list rivet_cgi_server_request_data rivet_cgi_server_request call_page ::rivetstarkit::puts_log] {
					if {[namespace qualifiers $var] != ""} {
						thread::send $threadId [list namespace eval [namespace qualifiers $var] ""]
					}

					set procargs [list]
					foreach arg [info args $proc] {
						if {[info default $proc $arg defval]} {







|












|







1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150

				# Copy the appropriate namespaces to the new thread
				foreach ns [list ::rivetstarkit] {
					thread::send $threadId [list namespace eval $ns ""]
				}

				# Copy the appropriate variables to the new thread
				foreach var [list ::starkit::topdir ::rivet_cgi_tls_verified($sock) ::rivetstarkit::process_model] {
					if {[namespace qualifiers $var] != ""} {
						thread::send $threadId [list namespace eval [namespace qualifiers $var] ""]
					}

					if {[info exists $var]} {
						thread::send $threadId [list set $var [set $var]]
					} else {
						thread::send $threadId [list unset -nocomplain $var]
					}
				}

				# Copy the appropriate procedures to the new thread
				foreach proc [list rivet_cgi_server_request_data rivet_cgi_server_request call_page ::rivetstarkit::puts_log ::rivetstarkit::logFdToRealFd] {
					if {[namespace qualifiers $var] != ""} {
						thread::send $threadId [list namespace eval [namespace qualifiers $var] ""]
					}

					set procargs [list]
					foreach arg [info args $proc] {
						if {[info default $proc $arg defval]} {