}
static gchar *configfile;
+static gboolean foreground;
static GOptionEntry opt_entries[] =
{
{ "config-file", 'c', 0, G_OPTION_ARG_FILENAME, &configfile,
"Configuration file location", "file" },
+ { "foreground", 'f', 0, G_OPTION_ARG_NONE, &foreground,
+ "Run in foreground", 0 },
{ NULL }
};
g_message ("Listening at %s:%s.", conf_address, port);
- daemon (0, 0);
+ if (!foreground)
+ daemon (0, 0);
g_free (conf_address);
g_free (port);