control.c File Reference

Methods for controlling processes managed by monit. More...

Go to the source code of this file.

Functions

void control (char *action, int toggle_validate_flag)
 Start/stop all processes in process list.

void control_group (char *G, char *action, int toggle_validate_flag)
void d_check_process (char *P, char *action)
 Pass on to methods in http/cervlet.c to start/stop processes.

void check_process (char *P, char *action, int toggle_validate_flag)
 Check to see if we should try to start/stop process.

void reset_depend ()


Detailed Description

Methods for controlling processes managed by monit.

Author:
Jan-Henrik Haukeland, <hauk@tildeslash.com> , Rory Toma, <rory@digeo.com>
Version:
$Id: control.c,v 1.34 2002/12/22 12:05:33 hauk Exp $

Definition in file control.c.


Function Documentation

void check_process char *    P,
char *    action,
int    toggle_validate_flag
 

Check to see if we should try to start/stop process.

Parameters:
P  A process name as stated in the config file
action  A string describing the action to execute
toggle_validate_flag  passed on to the start/stop functions

Definition at line 195 of file control.c.

References ASSERT, myrun::controlfile, error(), get_process(), is, is_process_running(), prog, Run, myprocess::start, and myprocess::stop.

Referenced by control(), and control_group().

void control char *    action,
int    toggle_validate_flag
 

Start/stop all processes in process list.

Parameters:
action  A string describing the action to execute
toggle_validate_flag  passed on to the start/stop functions

Definition at line 70 of file control.c.

References ASSERT, check_process(), d_check_process(), exist_daemon(), myprocess::name, myprocess::next, processlist, reset_depend(), and myprocess::visited.

void control_group char *    G,
char *    action,
int    toggle_validate_flag
 

Definition at line 97 of file control.c.

References ASSERT, check_process(), d_check_process(), exist_daemon(), myprocess::group, is, myprocess::name, myprocess::next, processlist, reset_depend(), and myprocess::visited.

void d_check_process char *    P,
char *    action
 

Pass on to methods in http/cervlet.c to start/stop processes.

Parameters:
P  A process name as stated in the config file
action  A string describing the action to execute

Definition at line 126 of file control.c.

References ASSERT, myrun::bind_addr, close_socket(), close_ssl_socket(), create_socket(), delete_ssl_socket(), embed_ssl_socket(), error(), get_basic_authentication_header(), myrun::httpdport, myrun::httpdssl, myrun::httpsslpem, new_ssl_connection(), prog, Run, send_ssl_socket(), sock_send(), and ssl_connection.

Referenced by control(), and control_group().

void reset_depend  
 

Definition at line 243 of file control.c.

References myprocess::depend_visited, myprocess::next, processlist, and myprocess::visited.

Referenced by control(), control_group(), and validate().