rpms/rhgb/devel rhgb-0.17.7-nodaemon-option.patch,NONE,1.1
Casey Dahlin (sadmac)
fedora-extras-commits at redhat.com
Tue Mar 11 16:56:39 UTC 2008
Author: sadmac
Update of /cvs/pkgs/rpms/rhgb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23711
Added Files:
rhgb-0.17.7-nodaemon-option.patch
Log Message:
Add missing nodaemon patch
rhgb-0.17.7-nodaemon-option.patch:
--- NEW FILE rhgb-0.17.7-nodaemon-option.patch ---
diff -urN rhgb-0.17.7/src/main.c rhgb-0.17.7-new/src/main.c
--- rhgb-0.17.7/src/main.c 2007-10-01 10:00:38.000000000 -0400
+++ rhgb-0.17.7-new/src/main.c 2008-03-02 23:07:51.000000000 -0500
@@ -108,6 +108,7 @@
static gint current_interval = -1;
static gboolean force_arg = 0;
static gboolean debug = 0;
+static gboolean nodaemon = 0;
static gboolean force_debug = 0;
static gboolean debug_interface = 0;
static char *use_existing_server = NULL;
@@ -982,6 +983,8 @@
POPT_AUTOHELP
{ "force", 'f', POPT_ARG_NONE, &force_arg, 1,
N_("Force the graphical boot to start"), NULL },
+ { "no-daemon", 'n', POPT_ARG_NONE, &nodaemon, 0,
+ N_("Do not fork"), NULL },
{ "debug", 'd', POPT_ARG_NONE, &debug, 0,
N_("Leave debugging information up"), NULL },
{ "use-existing-server", 'u', POPT_ARG_STRING, &use_existing_server, 0,
@@ -1033,17 +1036,19 @@
if (setup_ramfs () != 0)
setup_failed ();
- DEBUG_MESSAGE("forking\n");
- pid = fork ();
- if (pid < 0)
- setup_failed ();
- else if (pid > 0)
- {
- char *buf[5];
- close (pipe_fds[1]);
- read (pipe_fds[0], buf, 4);
- exit (0);
- }
+ if (!nodaemon) {
+ DEBUG_MESSAGE("forking\n");
+ pid = fork ();
+ if (pid < 0)
+ setup_failed ();
+ else if (pid > 0)
+ {
+ char *buf[5];
+ close (pipe_fds[1]);
+ read (pipe_fds[0], buf, 4);
+ exit (0);
+ }
+ }
/* Set ourselves up as a daemon */
close (pipe_fds[0]);
More information about the fedora-extras-commits
mailing list