Your message dated Wed, 16 Apr 2014 20:51:30 -0500
with message-id <[email protected]>
and subject line Re: Bug#574452: ucarp: Dont be session leader and call 
shutdown script when hup'ed
has caused the Debian Bug report #574452,
regarding ucarp: Dont be session leader and call shutdown script when hup'ed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
574452: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574452
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ucarp
Version: 1.5-2
Severity: normal
Tags: patch

ucarp is still a session leader after the daemonize function. Also when an 
instance 
receives a HUP - signal it just exits without calling a shutdown script, which 
could 
lead to a interface being up on both master + slave (at least for testing 
purposes).

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ucarp depends on:
ii  libc6                       2.7-18lenny2 GNU C Library: Shared libraries
ii  libpcap0.8                  0.9.8-5      system interface for user-level pa

Versions of packages ucarp recommends:
ii  iproute                       20080725-2 networking and traffic control too

ucarp suggests no packages.

-- no debconf information
diff -rup /usr/src/ucarp-1.5/src/carp.c /usr/src/ucarp-1.5-jk/src/carp.c
--- /usr/src/ucarp-1.5/src/carp.c	2010-03-17 17:40:42.000000000 +0100
+++ /usr/src/ucarp-1.5-jk/src/carp.c	2010-03-16 23:21:24.000000000 +0100
@@ -740,6 +740,7 @@ int docarp(void)
     
     if (shutdown_at_exit != 0) {
         (void) signal(SIGINT, sighandler_exit);
+        (void) signal(SIGHUP, sighandler_exit);
         (void) signal(SIGQUIT, sighandler_exit);
         (void) signal(SIGTERM, sighandler_exit);
     }
diff -rup /usr/src/ucarp-1.5/src/daemonize.c /usr/src/ucarp-1.5-jk/src/daemonize.c
--- /usr/src/ucarp-1.5/src/daemonize.c	2007-07-04 15:34:59.000000000 +0200
+++ /usr/src/ucarp-1.5-jk/src/daemonize.c	2010-03-17 17:21:50.000000000 +0100
@@ -61,6 +61,20 @@ void dodaemonize(void)
                     _("Unable to detach from the current session: %s"),
                     strerror(errno));  /* continue anyway */
         }
+
+	/* Dont be session leader */
+	switch( child = fork() ) {
+		case -1:
+			_exit(EXIT_FAILURE);
+			break;
+		case 0:
+			break;
+		default:
+			_exit( EXIT_SUCCESS );
+		break;
+	}
+	
+
         chdir("/");
         i = open_max();        
         do {

--- End Message ---
--- Begin Message ---
[ Joerg Kost ]

> ucarp is still a session leader after the daemonize function. Also when an 
> instance 
> receives a HUP - signal it just exits without calling a shutdown script, 
> which could 
> lead to a interface being up on both master + slave (at least for testing 
> purposes).

This issue was resolved long ago with the upstream release of 1.5.2; I'm
not sure how this bug report remained open for so long.

https://github.com/jedisct1/UCarp/commit/3f95507caee35985a91425aee59df4895706e4d7

Closing now.

Thanks again for the report and patch!

-- 
Eric Evans
[email protected]

--- End Message ---

Reply via email to