Hello community, here is the log from the commit of package dhcdbd checked in at Sat Nov 18 00:17:43 CET 2006. -------- --- dhcdbd/dhcdbd.changes 2006-10-25 12:53:36.000000000 +0200 +++ /mounts/work_src_done/STABLE/dhcdbd/dhcdbd.changes 2006-11-17 19:10:02.000000000 +0100 @@ -1,0 +2,5 @@ +Fri Nov 17 19:09:26 CET 2006 - varkoly@suse.de + +- Fixing bug #222267 - dhcdbd do not remove pid file + +------------------------------------------------------------------- New: ---- dhcdbd-signalhandling-1.14.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dhcdbd.spec ++++++ --- /var/tmp/diff_new_pack.GyA1gc/_old 2006-11-18 00:17:29.000000000 +0100 +++ /var/tmp/diff_new_pack.GyA1gc/_new 2006-11-18 00:17:29.000000000 +0100 @@ -14,8 +14,8 @@ BuildRequires: dbus-1-devel glib2-devel Summary: DHCP D-BUS Daemon Version: 1.14 -Release: 1 -License: GNU General Public License (GPL) - all versions +Release: 9 +License: GNU General Public License (GPL) Group: Productivity/Networking/Boot/Utilities URL: http://people.redhat.com/~jvdias/dhcdbd Source0: %{name}-%{version}.tar.gz @@ -27,6 +27,7 @@ Patch5: dhcdbd-set-hostname.patch Patch6: dhcdbd-set-hostname-fix.patch Patch7: dhcdbd-dbus-api-fix-thoenig-01.patch +Patch8: dhcdbd-signalhandling-1.14.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: dhcp-client >= 3.0.3 dbus-1 >= 0.90 @@ -50,6 +51,7 @@ %patch5 -p1 %patch6 -p1 %patch7 -p0 +%patch8 -p0 %build make CFLAGS="-Wall $RPM_OPT_FLAGS" CC='gcc' LIBDIR=%_lib @@ -73,6 +75,8 @@ %dir /var/lib/named %changelog -n dhcdbd +* Fri Nov 17 2006 - varkoly@suse.de +- Fixing bug #222267 - dhcdbd do not remove pid file * Wed Oct 25 2006 - thoenig@suse.de - Update patch dhcdbd-dbus-reconnect-thoenig-03.patch: Do not crash on D-Bus restart (b.n.c. 212468) ++++++ dhcdbd-signalhandling-1.14.dif ++++++ --- dhcdbd.c +++ dhcdbd.c 2006/11/17 16:36:21 @@ -2782,14 +2782,21 @@ return NOT_HANDLED; } +static DBUS_SVC dbus; +void quit_sig_handler(int signr) +{ + (void)signr; + dbus_svc_quit(dbus); +} + int dhcdbd_run( D_BUS_TYPE bus ) { - DBUS_SVC dbus; DHCO dhco; struct sigaction sa; char path[1024]; int fd, l; int reconnect = 0; + int exit_code = 0; if( dhcdbd_daemonize && (daemon(0, 0) == -1) ) return errno; @@ -2802,35 +2809,47 @@ if ( dbus == 0L ) { dhcdbd_log("Failed to initialise D-Bus service.\n"); - return( 1 ); + exit_code = 1; break; } dhco = dhco_new( dhcdbd_log ); if( dhco == 0L ) { dhcdbd_log("Failed to initialise DHCP options object.\n"); - return(1); + exit_code = 1; break; } dhcdbd_debug("dhco: %p", dhco); if ( !dbus_svc_add_path_handler ( dbus, dhcdbd_object_path, dhcdbd_interface_prefix, dhcdbd_message_handler, dhco, TRUE ) - )return( 1 ); + ) + { + exit_code = 1; break; + } if ( !dbus_svc_add_message_filter ( dbus, dhcdbd_message_filter, 0 ) - )return( 1 ); + ) + { + exit_code = 1; break; + } snprintf(path,1024,"subscribe.binary.binary"); if( !dbus_svc_add_handler(dbus, dhcdbd_object_path, path, dhcdbd_if_subscribe, dhco) ) - return( 1 ); + { + exit_code = 1; break; + } snprintf(path,1024,"subscribe.text.text"); if( !dbus_svc_add_handler(dbus, dhcdbd_object_path, path, dhcdbd_if_subscribe, dhco) ) - return( 1 ); + { + exit_code = 1; break; + } snprintf(path,1024,"subscribe.dbus.dbus"); if( !dbus_svc_add_handler(dbus, dhcdbd_object_path, path, dhcdbd_if_subscribe, dhco) ) - return( 1 ); + { + exit_code = 1; break; + } memset(&sa, '\0', sizeof(struct sigaction)); sa.sa_sigaction = dhc_reaper; @@ -2838,8 +2857,15 @@ if( sigaction( SIGCHLD, &sa, 0L ) == -1 ) { dhcdbd_log("sigaction failed: %s\n", strerror(errno)); - return( 1 ); + exit_code = 1; break; } + + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = quit_sig_handler; + sigaction(SIGINT, &sa, NULL); + sigaction(SIGTERM, &sa, NULL); + unlink(DHCDBD_PID_FILE); if( (fd = open(DHCDBD_PID_FILE, O_WRONLY | O_CREAT)) == -1 ) exit(errno); @@ -2856,7 +2882,7 @@ unlink(DHCDBD_PID_FILE); dhcdbd_log("Shut down."); - return( 0 ); + return( exit_code ); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org