From 495faa85666f6c057ea323ca63a62e901fa5bccc Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 24 Feb 2022 20:05:13 -0500 Subject: fix race condition with poll --- dot/local/bin/xvnc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index 2984aa7..a3efb2f 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc @@ -27,7 +27,10 @@ direct_connection() "$remote_host" \ "x11vnc -noxrecord -q -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & X11VNC=$! - sleep 1 + while ! [ -e "$local_socket_file" ] + do + sleep 0.3 + done xtigervncviewer "$local_socket_file" kill $X11VNC } -- cgit v1.2.3