rpms/rhgb/devel rhgb-0.16.4-wait-for-server-to-exit.patch, NONE, 1.1 rhgb.spec, 1.60, 1.61
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Dec 19 18:40:02 UTC 2006
Author: ajackson
Update of /cvs/dist/rpms/rhgb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10758
Modified Files:
rhgb.spec
Added Files:
rhgb-0.16.4-wait-for-server-to-exit.patch
Log Message:
* Tue Dec 19 2006 Adam Jackson <ajax at redhat.com> - 0.16.4-4
- rhgb-0.16.4-wait-for-server-to-exit.patch: Added, wait for the X server
to shut down before exiting.
rhgb-0.16.4-wait-for-server-to-exit.patch:
main.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
--- NEW FILE rhgb-0.16.4-wait-for-server-to-exit.patch ---
--- rhgb-0.16.4/src/main.c.wait-for-server-to-exit 2006-12-14 17:43:46.000000000 -0500
+++ rhgb-0.16.4/src/main.c 2006-12-14 17:45:24.000000000 -0500
@@ -177,6 +177,7 @@
{
if (child_pid > 0) {
kill (child_pid, SIGTERM);
+ waitpid(child_pid, NULL, 0);
child_pid = 0;
}
if (socket_fd >= 0) {
@@ -203,6 +204,8 @@
got_signal(int no ATTRIBUTE_UNUSED) {
if (child_pid > 0) {
kill (child_pid, SIGTERM);
+ waitpid(child_pid, NULL, 0);
+ child_pid = 0;
}
if (socket_fd >= 0) {
close(socket_fd);
@@ -454,8 +457,11 @@
setup_failed (void)
{
/* Do something */
- if (child_pid > 0)
+ if (child_pid > 0) {
kill (child_pid, SIGTERM);
+ waitpid(child_pid, NULL, 0);
+ child_pid = 0;
+ }
close(socket_fd);
close(pipe_fd);
unlink(SOCKET_NAME);
@@ -531,6 +537,13 @@
display_ready_fds[1] = -1;
}
+static void
+on_child_died (void)
+{
+ child_pid = 0;
+ gtk_main_quit ();
+}
+
/* Display
*/
@@ -590,7 +603,7 @@
g_spawn_async ("/", argv, NULL,
G_SPAWN_DO_NOT_REAP_CHILD,
(GSpawnChildSetupFunc) child_setup, NULL, &child_pid, NULL);
- g_child_watch_add (child_pid, (GChildWatchFunc) gtk_main_quit, NULL);
+ g_child_watch_add (child_pid, (GChildWatchFunc) on_child_died, NULL);
gtk_main ();
@@ -1181,7 +1194,4 @@
DEBUG_MESSAGE("Shutdown\n");
return exit_code;
-
-
-
}
Index: rhgb.spec
===================================================================
RCS file: /cvs/dist/rpms/rhgb/devel/rhgb.spec,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- rhgb.spec 26 Oct 2006 03:40:58 -0000 1.60
+++ rhgb.spec 19 Dec 2006 18:39:59 -0000 1.61
@@ -3,7 +3,7 @@
Summary: Red Hat Graphical Boot
Name: rhgb
Version: 0.16.4
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: http://www.redhat.com/
Source0: %{name}-%{version}.tar.gz
License: GPL
@@ -27,6 +27,7 @@
Patch8: rhgb-0.16.2-change-colors.patch
Patch9: rhgb-0.16.2-scale-logos.patch
Patch10: rhgb-0.16.4-random-fixups.patch
+Patch11: rhgb-0.16.4-wait-for-server-to-exit.patch
%description
Red Hat Graphical Boot provides a clean and simple interface to the boot process
@@ -44,6 +45,7 @@
%patch8 -p1 -b .change-colors
%patch9 -p1 -b .scale-logos
%patch10 -p1 -b .random-fixups
+%patch11 -p1 -b .wait-for-server-to-exit
%build
%configure
@@ -73,6 +75,10 @@
%dir %{_sysconfdir}/rhgb/temp
%changelog
+* Tue Dec 19 2006 Adam Jackson <ajax at redhat.com> - 0.16.4-4
+- rhgb-0.16.4-wait-for-server-to-exit.patch: Added, wait for the X server
+ to shut down before exiting.
+
* Wed Oct 25 2006 Ray Strode <rstrode at redhat.com> - 0.16.4-3
- kill rhgb before gdm starts to prevent weird vt switching
behavior (bug 211848)
More information about the fedora-cvs-commits
mailing list