summaryrefslogtreecommitdiffstats
path: root/x11vnc/tkx11vnc.h
diff options
context:
space:
mode:
authorrunge <runge>2008-09-14 19:28:25 +0000
committerrunge <runge>2008-09-14 19:28:25 +0000
commit95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4 (patch)
tree37da2bfec58413d02c9fbe59f86e848bf0fec348 /x11vnc/tkx11vnc.h
parentd5cba7a574a667f5321194cb05d0b4adcb995866 (diff)
downloadlibtdevnc-95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4.tar.gz
libtdevnc-95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4.zip
x11vnc: -sleepin m-n for random sleep. More mktemp and mkstemp
protections. SSL_INIT_TIMEOUT=n env. var. Fix macosx console X call bug. Synchronize other projects sources.
Diffstat (limited to 'x11vnc/tkx11vnc.h')
-rw-r--r--x11vnc/tkx11vnc.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/x11vnc/tkx11vnc.h b/x11vnc/tkx11vnc.h
index 7641f9f..f4b688d 100644
--- a/x11vnc/tkx11vnc.h
+++ b/x11vnc/tkx11vnc.h
@@ -6286,10 +6286,17 @@ char gui_code[] = "";
" exit 1;\n"
" }\n"
" set tmp \"/tmp/x11vnc[pid]\"\n"
-" file delete -force $tmp\n"
-" if {[file exists $tmp]} {\n"
-" puts stderr \"failure in restart_everything.\"\n"
-" exit 1;\n"
+" append tmp [clock clicks]\n"
+" set tmp2 \"\"\n"
+" catch {set tmp2 [exec mktemp $tmp.XXXXXX 2>/dev/null]}\n"
+" if {$tmp2 != \"\" && [file exists $tmp2]} {\n"
+" set tmp $tmp2\n"
+" } else {\n"
+" file delete -force $tmp\n"
+" if {[file exists $tmp]} {\n"
+" puts stderr \"failure in restart_everything.\"\n"
+" exit 1;\n"
+" }\n"
" }\n"
" set fh [open $tmp \"a\"]\n"
" if {![file owned $tmp]} {\n"