~ubuntu-dev/ubuntu/lucid/acpid/lucid-201002110914

« back to all changes in this revision

Viewing changes to acpid.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2006-07-11 17:50:13 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20060711175013-fg69dxvr9u2gcfh7
Tags: 1.0.4-5ubuntu1
* Merge from debian unstable, remaining changes:
  - Lock file and groups,
  - LSB init script,
  - init script level change,
  - load all modules by default,
  - Power button handling changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
static int daemonize(void);
43
43
static int open_logs(void);
44
44
static void clean_exit(int sig);
 
45
static void reopen_logs(int sig);
45
46
static void reload_conf(int sig);
46
47
static char *read_line(int fd);
47
48
 
165
166
 
166
167
        /* trap key signals */
167
168
        signal(SIGHUP, reload_conf);
 
169
        signal(SIGUSR1, reopen_logs);
168
170
        signal(SIGINT, clean_exit);
169
171
        signal(SIGQUIT, clean_exit);
170
172
        signal(SIGTERM, clean_exit);
479
481
        acpid_read_conf(confdir);
480
482
}
481
483
 
 
484
static void
 
485
reopen_logs(int sig)
 
486
{
 
487
        /* normal logging unless debugging */
 
488
        if (!acpid_debug) {
 
489
                if (open_logs() < 0)
 
490
                        exit(EXIT_FAILURE);
 
491
        }
 
492
 
 
493
        acpid_log("logfile reopened\n");
 
494
}
 
495
 
482
496
int 
483
497
acpid_log(const char *fmt, ...)
484
498
{