/[monit]/monit/monitor.c
ViewVC logotype

Diff of /monit/monitor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by martinp, Tue Dec 17 19:10:16 2002 UTC revision 1.33 by hauk, Tue Dec 17 19:55:17 2002 UTC
# Line 138  static void do_init() { Line 138  static void do_init() {
138    status= pthread_mutex_init(&Run.mutex, NULL);    status= pthread_mutex_init(&Run.mutex, NULL);
139    if(status != 0) {    if(status != 0) {
140            
141      error("%s: Cannot initialize mutex -- %s\n", prog, strerror(status));      log("%s: Cannot initialize mutex -- %s\n", prog, strerror(status));
142      exit(1);      exit(1);
143            
144    }    }
# Line 161  static void do_init() { Line 161  static void do_init() {
161     * Start the Parser and create the process list. This will also set     * Start the Parser and create the process list. This will also set
162     * any Runtime constants defined in the controlfile.     * any Runtime constants defined in the controlfile.
163     */     */
   
164    if(! parse(Run.controlfile)) {    if(! parse(Run.controlfile)) {
     log("I should only be here once\n");  
165            
166      exit(1);      exit(1);
167            
# Line 183  static void do_init() { Line 181  static void do_init() {
181     */     */
182    if(! processlist) {    if(! processlist) {
183            
184      error("%s: No programs have been specified\n", prog);      log("%s: No programs have been specified\n", prog);
185      exit(0);      exit(0);
186            
187    }    }
# Line 241  static void do_reinit() { Line 239  static void do_reinit() {
239    /* Did we find any process ?  */    /* Did we find any process ?  */
240    if(! processlist) {    if(! processlist) {
241            
242      error("%s: No programs have been specified\n", prog);      log("%s: No programs have been specified\n", prog);
243      exit(0);      exit(0);
244            
245    }    }
# Line 356  static void do_action(char **args) { Line 354  static void do_action(char **args) {
354            
355    } else if(is(action, "quit")) {    } else if(is(action, "quit")) {
356            
357      log("Stopping monit daemon\n", prog);      error("Stopping monit daemon\n", prog);
358      kill_daemon();      kill_daemon();
359            
360    } else if(is(action, "validate")) {    } else if(is(action, "validate")) {
# Line 459  static void do_default() { Line 457  static void do_default() {
457            
458      if(can_http()) {      if(can_http()) {
459                
460        printf("Starting httpd at [%s:%d]\n", Run.bind_addr?Run.bind_addr:"*", Run.httpdport);        printf("Starting httpd at [%s:%d]\n",
461                 Run.bind_addr?Run.bind_addr:"*", Run.httpdport);
462                
463      }      }
464            

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26