~ubuntu-branches/ubuntu/karmic/system-tools-backends/karmic-proposed

« back to all changes in this revision

Viewing changes to dispatcher/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2009-10-08 11:42:26 UTC
  • mfrom: (1.1.28 upstream) (1.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091008114226-zp9fxn7h4ky0qai0
Tags: 2.8.2-1
* New upstream release.
  - debian/patches/01_debian_4.0.patch,
  - debian/patches/04_correct_perl_command.patch:
    + Removed, fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
{
89
89
  GMainLoop *main_loop;
90
90
  gboolean debug = FALSE;
91
 
  gboolean no_daemon = FALSE;
 
91
  gboolean daemon = FALSE;
92
92
  GOptionContext *context;
93
93
  GOptionEntry entries[] =
94
94
    {
95
95
      { "debug",     'd', 0, G_OPTION_ARG_NONE, &debug,     "Debug mode",     NULL },
96
 
      { "no-daemon", 'n', 0, G_OPTION_ARG_NONE, &no_daemon, "No daemon mode", NULL },
 
96
      { "daemon",    'D', 0, G_OPTION_ARG_NONE, &daemon, "Daemon mode", NULL },
 
97
      /* Option kept for backward compatibility */
 
98
      { "no-daemon", 'n', G_OPTION_FLAG_HIDDEN | G_OPTION_FLAG_REVERSE,
 
99
                             G_OPTION_ARG_NONE, &daemon, "No daemon mode (default)", NULL },
97
100
      { NULL }
98
101
    };
99
102
 
105
108
  g_option_context_parse (context, &argc, &argv, NULL);
106
109
  g_option_context_free (context);
107
110
 
108
 
  /* keep the envvar for backwards compat */
109
 
  if (!no_daemon && !getenv ("STB_NO_DAEMON"))
 
111
  if (daemon)
110
112
    daemonize ();
111
113
 
112
114
  signal (SIGTERM, signal_received);