rpms/vnc/devel vnc-rh212985.patch,NONE,1.1 vnc.spec,1.198,1.199

Adam Tkac (atkac) fedora-extras-commits at redhat.com
Thu Jul 17 11:18:26 UTC 2008


Author: atkac

Update of /cvs/pkgs/rpms/vnc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16434

Modified Files:
	vnc.spec 
Added Files:
	vnc-rh212985.patch 
Log Message:
- vncserver script returns error when Xvnc fails to start


vnc-rh212985.patch:

--- NEW FILE vnc-rh212985.patch ---
diff -up vnc-4_1_2-unixsrc/unix/vncserver.rh212985 vnc-4_1_2-unixsrc/unix/vncserver
--- vnc-4_1_2-unixsrc/unix/vncserver.rh212985	2008-07-16 13:55:29.000000000 +0200
+++ vnc-4_1_2-unixsrc/unix/vncserver	2008-07-16 14:17:53.000000000 +0200
@@ -168,11 +168,25 @@ $cmd .= " >> " . &quotedString($desktopL
 # Run $cmd and record the process ID.
 
 $pidFile = "$vncUserDir/$host:$displayNumber.pid";
-system("$cmd & echo \$! >$pidFile");
+system(
+"rm -f $pidFile
+ $cmd &
+ PID_TEMP=\$!
+ PID_NUM=\$PID_TEMP
+
+ # Give Xvnc a chance to start up
+
+ sleep 3;
+
+ if ps -p \$PID_NUM -o comm= | grep -q Xvnc; then
+     echo \$PID_NUM > $pidFile
+ fi"
+);
 
-# Give Xvnc a chance to start up
-
-sleep(3); 
+if (!(-e "$pidFile")) {
+    warn "Unable to start Xvnc, exiting\n";
+    exit;
+}
 
 warn "\nNew '$desktopName' desktop is $host:$displayNumber\n\n";
 


Index: vnc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vnc/devel/vnc.spec,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -r1.198 -r1.199
--- vnc.spec	16 Jul 2008 11:40:44 -0000	1.198
+++ vnc.spec	17 Jul 2008 11:17:36 -0000	1.199
@@ -3,7 +3,7 @@
 Summary:   A remote display system
 Name:      vnc
 Version:   4.1.2
-Release:   33.1%{?dist}
+Release:   34%{?dist}
 URL:       http://www.realvnc.com
 Source0:   http://www.realvnc.com/dist/vnc-%{vnc_version}-unixsrc.tar.gz
 Source1:   Makefile.am
@@ -46,6 +46,7 @@
 Patch51:   vnc-bounds.patch
 Patch52:   vnc-includes.patch
 Patch53:   vnc-viewerIPv6.patch
+Patch54:   vnc-rh212985.patch
 
 License:   GPLv2
 Group:     User Interface/Desktops
@@ -141,6 +142,7 @@
 %patch51 -p1 -b .bounds
 %patch52 -p1 -b .includes
 %patch53 -p1 -b .ipv6
+%patch54 -p1 -b .rh212985
 
 %build
 export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0"
@@ -330,6 +332,9 @@
 %{_libdir}/librfb.so.*
 
 %changelog
+* Thu Jul 17 2008 Adam Tkac <atkac redhat com> 4.1.2-34
+- vncserver script returns error when Xvnc fails to start
+
 * Wed Jul 16 2008 Adam Tkac <atkac redhat com> 4.1.2-33.1
 - update patches due rpm 4.6
 




More information about the scm-commits mailing list