RCS file: /Volumes/src/cvs/od/projects/darwinports/base/src/port1.0/porttrace.tcl,v
retrieving revision 1.11
diff -u -r1.11 porttrace.tcl
|
|
|
164 | 164 | # Private. |
165 | 165 | # Slave method to read a line from the trace. |
166 | 166 | proc slave_read_line {chan} { |
167 | | global ports_list trace_filemap created_list workpath trace_mutex own_mutex |
| 167 | global ports_list trace_filemap created_list workpath trace_mutex own_mutex envtmpdir |
168 | 168 | |
169 | 169 | # Acquire the mutex. |
170 | 170 | thread::mutex lock $trace_mutex |
… |
… |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | } elseif {$op == "create"} { |
222 | | # Only keep entries not under workpath, under /tmp/, under |
| 222 | # Only keep entries not under workpath, ignore entries under ENV{TMPDIR}, /tmp/, under |
223 | 223 | # /var/tmp/ and /dev/null |
224 | 224 | if {![string equal -length [string length "/tmp/"] "/tmp/" $path] |
| 225 | && !([info exists envtmpdir] && [string equal -length [string length "$envtmpdir"] "$envtmpdir" $path]) |
225 | 226 | && ![string equal -length [string length "/var/tmp/"] "/var/tmp/" $path] |
226 | 227 | && ![string equal "/dev/null" $path] |
227 | 228 | && ![string equal -length [string length $workpath] $workpath $path]} { |
… |
… |
|
238 | 239 | # Slave init method. |
239 | 240 | proc slave_start {fifo p_workpath mutex} { |
240 | 241 | global ports_list trace_filemap created_list trace_fifo_r_chan \ |
241 | | trace_fifo_w_chan workpath trace_mutex own_mutex |
| 242 | trace_fifo_w_chan workpath trace_mutex own_mutex \ |
| 243 | env envtmpdir |
242 | 244 | # Save the workpath and the mutex. |
243 | 245 | set workpath $p_workpath |
244 | 246 | set trace_mutex $mutex |
245 | 247 | set own_mutex 0 |
| 248 | # capture user's TMPDIR for ignoring path elements created there. |
| 249 | if {[info exists env(TMPDIR)]} { |
| 250 | set envtmpdir $env(TMPDIR); |
| 251 | } |
246 | 252 | # Create a virtual filemap. |
247 | 253 | filemap create trace_filemap |
248 | 254 | set ports_list {} |