Sha256: faa4b8cdcc9887b51a31f111f6d3a6c469f6af5b5245ac83f9d0697d6e1c2cb5

Contents?: true

Size: 1.35 KB

Versions: 8

Compression:

Stored size: 1.35 KB

Contents

--- ./nrpe-2.13/src/nrpe.c	2011-11-11 10:45:49.000000000 -0800
+++ ./nrpe-2.13-runit/src/nrpe.c	2012-01-12 17:48:31.511472215 -0800
@@ -85,6 +85,7 @@
 int     show_version=FALSE;
 int     use_inetd=TRUE;
 int     debug=FALSE;
+int     stay_in_foreground=FALSE;



@@ -273,26 +274,9 @@
		/* handle the connection */
		handle_connection(0);
	        }
-
	/* else daemonize and start listening for requests... */
-	else if(fork()==0){
+	else if(1){

-		/* we're a daemon - set up a new process group */
-		setsid();
-
-		/* close standard file descriptors */
-		close(0);
-		close(1);
-		close(2);
-
-		/* redirect standard descriptors to /dev/null */
-		open("/dev/null",O_RDONLY);
-		open("/dev/null",O_WRONLY);
-		open("/dev/null",O_WRONLY);
-
-		chdir("/");
-		/*umask(0);*/
-
		/* handle signals */
		signal(SIGQUIT,sighandler);
		signal(SIGTERM,sighandler);
@@ -301,16 +285,6 @@
		/* log info to syslog facility */
		syslog(LOG_NOTICE,"Starting up daemon");

-		/* write pid file */
-		if(write_pid_file()==ERROR)
-			return STATE_CRITICAL;
-
-		/* drop privileges */
-		drop_privileges(nrpe_user,nrpe_group);
-
-		/* make sure we're not root */
-		check_privileges();
-
		do{

			/* reset flags */
@@ -337,9 +311,6 @@

		        }while(sigrestart==TRUE && sigshutdown==FALSE);

-		/* remove pid file */
-		remove_pid_file();
-
		syslog(LOG_NOTICE,"Daemon shutdown\n");
	        }

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
omnibus-3.2.2 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.2.1 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.2.0 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.2.0.rc.3 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.2.0.rc.2 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.2.0.rc.1 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.1.1 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch
omnibus-3.1.0 spec/data/complicated/config/patches/nrpe/fix_for_runit.patch