From 95d7788eb062a6c6ba07bee516e4e8f1cc8a4db4 Mon Sep 17 00:00:00 2001 From: runge Date: Sun, 14 Sep 2008 19:28:25 +0000 Subject: 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. --- x11vnc/tkx11vnc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'x11vnc/tkx11vnc') diff --git a/x11vnc/tkx11vnc b/x11vnc/tkx11vnc index 6fc846e..4260d27 100755 --- a/x11vnc/tkx11vnc +++ b/x11vnc/tkx11vnc @@ -6275,10 +6275,17 @@ proc restart_everything {gui_mode} { exit 1; } set tmp "/tmp/x11vnc[pid]" - file delete -force $tmp - if {[file exists $tmp]} { - puts stderr "failure in restart_everything." - exit 1; + append tmp [clock clicks] + set tmp2 "" + catch {set tmp2 [exec mktemp $tmp.XXXXXX 2>/dev/null]} + if {$tmp2 != "" && [file exists $tmp2]} { + set tmp $tmp2 + } else { + file delete -force $tmp + if {[file exists $tmp]} { + puts stderr "failure in restart_everything." + exit 1; + } } set fh [open $tmp "a"] if {![file owned $tmp]} { -- cgit v1.2.1