Index: openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl,v diff -u -r1.68.2.14 -r1.68.2.15 --- openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 8 Dec 2020 15:51:38 -0000 1.68.2.14 +++ openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 2 Aug 2021 21:16:31 -0000 1.68.2.15 @@ -446,16 +446,17 @@ set :spooling 1 # puts -nonewline [:channel] $data # :done - set filename [ad_tmpnam] - set fd [open $filename w] + + set fd [file tempfile spool_filename [ad_tmpdir]/nsd-spool-XXXXXX] fconfigure $fd -translation binary -encoding $encoding puts -nonewline $fd $data close $fd - set fd [open $filename] + + set fd [open $spool_filename] fconfigure $fd -translation binary -encoding $encoding fconfigure [:channel] -translation binary -encoding $encoding fcopy $fd [:channel] -command \ - [list [self] end-delivery $filename $fd [:channel] $request] + [list [self] end-delivery $spool_filename $fd [:channel] $request] } } ::HttpSpooler instproc end-delivery {filename fd ch request bytes args} { Index: openacs-4/packages/xotcl-core/www/show-class-graph.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-class-graph.tcl,v diff -u -r1.12.2.3 -r1.12.2.4 --- openacs-4/packages/xotcl-core/www/show-class-graph.tcl 26 Aug 2020 18:50:43 -0000 1.12.2.3 +++ openacs-4/packages/xotcl-core/www/show-class-graph.tcl 2 Aug 2021 21:16:33 -0000 1.12.2.4 @@ -23,7 +23,6 @@ set tmpnam [ad_tmpnam] set tmpfile $tmpnam.$format -set f [open $tmpnam.$format w]; puts $f $dot_code; close $f #ns_log notice "png $tmpnam dot $tmpnam.dot" set f [open "|$dot -T$format -o $tmpfile" w]; puts $f $dot_code; close $f Index: openacs-4/packages/xotcl-core/www/show-object.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/show-object.tcl,v diff -u -r1.27.2.5 -r1.27.2.6 --- openacs-4/packages/xotcl-core/www/show-object.tcl 8 Aug 2020 08:08:20 -0000 1.27.2.5 +++ openacs-4/packages/xotcl-core/www/show-object.tcl 2 Aug 2021 21:16:33 -0000 1.27.2.6 @@ -428,18 +428,16 @@ #ad_script_abort } else { - set tmpnam [ad_tmpnam] - set tmpfile $tmpnam.svg - set f [open $tmpnam.dot w]; puts $f $dot_code; close $f + set svgfile [ad_tmpnam].svg + #ns_log notice "svg $svgfile" - #ns_log notice "svg $tmpnam dot $tmpnam.dot" - set f [open "|$dot -Tsvg -o $tmpfile" w]; puts $f $dot_code + set f [open "|$dot -Tsvg -o $svgfile" w]; puts $f $dot_code try { close $f } on error {errorMsg} { ns_log warning "dot returned $errorMsg" } - set f [open $tmpfile]; set svg [read $f]; close $f + set f [open $svgfile]; set svg [read $f]; close $f # delete the first three lines generated from dot regsub {^[^\n]+\n[^\n]+\n[^\n]+\n} $svg "" svg @@ -449,8 +447,8 @@ } set svg "