~vorlon/ubuntu/raring/upstart/lp.1199778

« back to all changes in this revision

Viewing changes to init/main.c

  • Committer: Scott James Remnant
  • Date: 2008-06-05 00:22:53 UTC
  • Revision ID: scott@netsplit.com-20080605002253-hgjp5b1zzcug30oi
* init/main.c: Remove handling for stop/cont; there's no reason
a user should be able to pause the event queue.
(stop_handler): Drop function.
* init/event.c (event_poll): Remove paused handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
static void pwr_handler     (void *data, NihSignal *signal);
72
72
#endif /* DEBUG */
73
73
static void hup_handler     (void *data, NihSignal *signal);
74
 
static void stop_handler    (void *data, NihSignal *signal);
75
74
 
76
75
 
77
76
/**
215
214
        nih_signal_set_handler (SIGCHLD, nih_signal_handler);
216
215
        nih_signal_set_handler (SIGALRM, nih_signal_handler);
217
216
 
218
 
        /* Allow SIGTSTP and SIGCONT to pause and unpause event processing */
219
 
        nih_signal_set_handler (SIGTSTP, nih_signal_handler);
220
 
        NIH_MUST (nih_signal_add_handler (NULL, SIGTSTP, stop_handler, NULL));
221
 
 
222
 
        nih_signal_set_handler (SIGCONT, nih_signal_handler);
223
 
        NIH_MUST (nih_signal_add_handler (NULL, SIGCONT, stop_handler, NULL));
224
 
 
225
217
#ifndef DEBUG
226
218
        /* Ask the kernel to send us SIGINT when control-alt-delete is
227
219
         * pressed; generate an event with the same name.
525
517
        nih_info (_("Reloading configuration"));
526
518
        conf_reload ();
527
519
}
528
 
 
529
 
/**
530
 
 * stop_handler:
531
 
 * @data: unused,
532
 
 * @signal: signal caught.
533
 
 *
534
 
 * This is called when we receive the STOP, TSTP or CONT signals; we
535
 
 * adjust the paused variable appropriately so that the event queue and
536
 
 * job stalled detection is not run.
537
 
 **/
538
 
static void
539
 
stop_handler (void      *data,
540
 
              NihSignal *signal)
541
 
{
542
 
        nih_assert (signal != NULL);
543
 
 
544
 
        if (signal->signum == SIGCONT) {
545
 
                nih_info (_("Event queue resumed"));
546
 
                paused = FALSE;
547
 
        } else {
548
 
                nih_info (_("Event queue paused"));
549
 
                paused = TRUE;
550
 
        }
551
 
}