diff options
author | Andrew Cady <d@jerkface.net> | 2022-02-24 20:05:13 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2022-10-09 13:53:09 -0400 |
commit | 495faa85666f6c057ea323ca63a62e901fa5bccc (patch) | |
tree | e4026a26eaf47372db67b406edce56433b31e9e8 | |
parent | 09440c7bd3b7541cb05cc3727dc4b1464fbe1402 (diff) |
fix race condition with poll
-rwxr-xr-x | dot/local/bin/xvnc | 5 |
1 files changed, 4 insertions, 1 deletions
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() | |||
27 | "$remote_host" \ | 27 | "$remote_host" \ |
28 | "x11vnc -noxrecord -q -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & | 28 | "x11vnc -noxrecord -q -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & |
29 | X11VNC=$! | 29 | X11VNC=$! |
30 | sleep 1 | 30 | while ! [ -e "$local_socket_file" ] |
31 | do | ||
32 | sleep 0.3 | ||
33 | done | ||
31 | xtigervncviewer "$local_socket_file" | 34 | xtigervncviewer "$local_socket_file" |
32 | kill $X11VNC | 35 | kill $X11VNC |
33 | } | 36 | } |