ports/162581: [patch] sysutils/monitord exits with wrong error code, causing the rc.d system to mark it as failed

Ivan Voras ivoras at gmail.com
Tue Nov 15 13:50:07 UTC 2011


>Number:         162581
>Category:       ports
>Synopsis:       [patch] sysutils/monitord exits with wrong error code, causing the rc.d system to mark it as failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 15 13:50:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ivan Voras
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD lara.cc.fer.hr 8.2-STABLE FreeBSD 8.2-STABLE #1: Tue Sep 6 14:03:24 CEST 2011 ivoras at lara.cc.fer.hr:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	
The sysutils/monitord port has a bug: it exits with exit code 1 when the
fork to background has succeeded, which interferes with rc.d detection
of a successful operation.
>How-To-Repeat:
	
>Fix:

	
The following patch fixes the problem - it should be added to the list of port
patch files.

--- monitord.c.ori      2011-11-15 14:38:56.000000000 +0100
+++ monitord.c  2011-11-15 14:39:32.000000000 +0100
@@ -85,8 +85,8 @@
                        setsid ();
                        break;
                }
-               default:
-               exit(1);
+               default: // The parent exits
+                       exit(0);
        }

        /* Read the configuration file, saving it in *file[] and return the number of lines

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list