~ubuntu-branches/ubuntu/maverick/dbus/maverick-proposed

« back to all changes in this revision

Viewing changes to tools/dbus-monitor.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-08-09 16:09:57 UTC
  • mfrom: (1.3.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100809160957-3xh1a1tnhxebs159
Tags: 1.2.24-3ubuntu1
* Resync on Debian
* Remaining Ubuntu Changes:
  - Install into / rather than /usr.
  - debian/control: Depend on ConsoleKit for "at_console" policy stanza.
  - debian/dbus.postinst: Do not restart dbus on upgrades, since it breaks
    too many applications. Instead, trigger a "reboot required" notification.
  - debian/dbus.postinst: Create /var/run/dbus in postinst to handle system
    being rebooted before package is configured.  LP: #275229.
  - Add debian/dbus.upstart and bump debhelper b-dep to ensure that it is
    properly installed.
  - 20_system_conf_limit.patch: Increase max_match_rules_per_connection for
    the system bus to 5000 (LP #454093)
  - 81-session.conf-timeout.patch: Raise the service startup timeout from 25
    to 60 seconds. It may be too short on the live CD with slow machines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
 
34
34
#include <time.h>
35
35
 
36
 
#include <signal.h>
37
 
 
38
36
#include "dbus-print-message.h"
39
37
 
40
38
#ifdef DBUS_WIN
214
212
  
215
213
  int i = 0, j = 0, numFilters = 0;
216
214
  char **filters = NULL;
 
215
 
 
216
  /* Set stdout to be unbuffered; this is basically so that if people
 
217
   * do dbus-monitor > file, then send SIGINT via Control-C, they
 
218
   * don't lose the last chunk of messages.
 
219
   */
 
220
  setvbuf (stdout, NULL, _IOLBF, 0);
 
221
 
217
222
  for (i = 1; i < argc; i++)
218
223
    {
219
224
      char *arg = argv[i];
339
344
    exit (1);
340
345
  }
341
346
 
342
 
  /* we handle SIGINT so exit() is reached and flushes stdout */
343
 
  signal (SIGINT, sigint_handler);
344
 
  while (dbus_connection_read_write_dispatch(connection, -1)
345
 
          && !sigint_received)
 
347
  while (dbus_connection_read_write_dispatch(connection, -1))
346
348
    ;
347
349
  exit (0);
348
350
 lose: