From ivoras@lara.cc.fer.hr  Tue Nov 15 13:47:31 2011
Return-Path: <ivoras@lara.cc.fer.hr>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75F83106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Nov 2011 13:47:31 +0000 (UTC)
	(envelope-from ivoras@lara.cc.fer.hr)
Received: from lara.cc.fer.hr (unknown [IPv6:2002:a135:4871::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 09C4A8FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Nov 2011 13:47:30 +0000 (UTC)
Received: from lara.cc.fer.hr (localhost [127.0.0.1])
	by lara.cc.fer.hr (8.14.5/8.14.5) with ESMTP id pAFDlTbE079717
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Nov 2011 14:47:29 +0100 (CET)
	(envelope-from ivoras@lara.cc.fer.hr)
Received: (from ivoras@localhost)
	by lara.cc.fer.hr (8.14.5/8.14.5/Submit) id pAFDlSbG079716;
	Tue, 15 Nov 2011 14:47:29 +0100 (CET)
	(envelope-from ivoras)
Message-Id: <201111151347.pAFDlSbG079716@lara.cc.fer.hr>
Date: Tue, 15 Nov 2011 14:47:29 +0100 (CET)
From: Ivan Voras <ivoras@gmail.com>
Reply-To: Ivan Voras <ivoras@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] sysutils/monitord exits with wrong error code, causing the rc.d system to mark it as failed
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 15 13:50:06 UTC 2011
>Closed-Date:    Thu Nov 24 15:16:58 UTC 2011
>Last-Modified:  Thu Nov 24 15:20:07 UTC 2011
>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@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:
State-Changed-From-To: open->suspended  
State-Changed-By: scheidell 
State-Changed-When: Thu Nov 24 15:01:51 UTC 2011 
State-Changed-Why:  
back to pool, patch submitted to upstream for acceptance. 
pr suspended 


http://www.freebsd.org/cgi/query-pr.cgi?pr=162581 
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Thu Nov 24 15:10:29 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162581 
State-Changed-From-To: suspended->closed 
State-Changed-By: miwi 
State-Changed-When: Thu Nov 24 15:16:57 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162581 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/162581: commit references a PR
Date: Thu, 24 Nov 2011 15:16:54 +0000 (UTC)

 miwi        2011-11-24 15:16:45 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/monitord    Makefile 
     sysutils/monitord/files patch-ab 
   Log:
   - Fix exits with wrong error code
   - Bump PORTREVISION
   
   PR:             162581
   Submitted by:   Ivan Voras <ivoras@gmail.com>
   Feature safe:   yes
   
   Revision  Changes    Path
   1.12      +1 -1      ports/sysutils/monitord/Makefile
   1.2       +13 -2     ports/sysutils/monitord/files/patch-ab
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
