Bug 162581 - [patch] sysutils/monitord exits with wrong error code, causing the rc.d system to mark it as failed
Summary: [patch] sysutils/monitord exits with wrong error code, causing the rc.d syste...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 13:50 UTC by Ivan Voras
Modified: 2011-11-24 15:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Voras 2011-11-15 13:50:06 UTC
	
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.

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



/* Read the configuration file, saving it in *file[] and return the number of lines--HkZEjwPtKaCElLgJ997WiO1pYjBLsIb4YZ5StCMttIt11pUc
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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);
        }
Comment 1 Michael Scheidell freebsd_committer freebsd_triage 2011-11-24 15:01:51 UTC
State Changed
From-To: open->suspended

back to pool, patch submitted to upstream for acceptance. 
pr suspended
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2011-11-24 15:10:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-11-24 15:16:54 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"
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2011-11-24 15:16:57 UTC
State Changed
From-To: suspended->closed

Committed. Thanks!