Overview
| Artifact ID: | 336ea780dd5b6ba938e2f5871665c96812d850ba |
|---|---|
| Ticket: | 873294ffffffffffffffffffffffffffffffffff
script crashes Tcl 8.4.X on Solaris (verified by J. Hobbs) |
| User & Date: | nobody on 2004-01-08 20:25:24 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
# this script crashes under Tcl 8.4.X (all versions) # 32 bit compile under gcc 3.3.1 # on: # SunOS ldas-suntest2 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Fire-280R Solaris # and possibly others... but does not crash under Tcl <= 8.3.5 proc solaris { file } { if { [ catch { set now [ clock seconds ] set usr [ file attributes $file -owner ] set fid [ open $file r ] fconfigure $fid -encoding binary -translation binary set numinfo [ read $fid 88 ] set fname [ read $fid 16 ] set args [ read $fid 80 ] set more [ read $fid 16 ] ::close $fid ;## the meaty part binary scan $numinfo IIIIIIIIIIIIIIISSI \ . . pid ppid . . ruser . . . . vsz rsz . . pcpu pmem stt ;## try to make sense out of pr_wstat binary scan $more I state if { $state == 0 } { set state R } else { set state Z } regsub -all \x00 $fname {} fname regsub -all \x00 $args {} args set etime [ expr { $now - $stt } ] if { ! [ string equal 0 $pmem ] } { set pmem [ expr { $pmem / 327.67 } ] set pmem [ format %.2f $pmem ] } if { ! [ string equal 0 $pcpu ] } { set pcpu [ expr { $pcpu / 327.67 } ] set pcpu [ format %.2f $pcpu ] } } err ] } { return -code error $err } puts stderr "$pid $state $usr $vsz $rsz $pcpu $pmem $etime $fname $args" } foreach file [ glob /proc/*/psinfo ] { puts stderr $file solaris $file } - foundin changed to: "obsolete: 8.4.5"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "41. Memory Allocation"
- title changed to:
script crashes Tcl 8.4.X on Solaris (verified by J. Hobbs)
- type changed to: "Bug"