[patch] better error checking in vncserver

Tim Waugh twaugh "at" redhat.com
Tue, 29 Jan 2002 08:40:20 +0000


Here is a patch to make vncserver actually check that Xvnc
successfully started up.

Tim.
*/

--- vncserver	Thu Nov 29 19:43:46 2001
+++ vncserver	Tue Jan 29 08:24:09 2002
@@ -164,6 +164,13 @@
 # Give Xvnc a chance to start up
 
 sleep(3); 
+unless (kill 0, `cat $pidFile`) {
+    warn "Couldn't start Xvnc process.\n\n";
+    open(LOG, "<$desktopLog");
+    while (<LOG>) { print; }
+    close(LOG);
+    die "\n";
+}
 
 warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n";
---------------------------------------------------------------------
To unsubscribe, mail majordomo "at" uk.research.att.com with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------