stop.c File Reference

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

Go to the source code of this file.

Functions

void stop ()
 Stop all processes in the process list. More...

void stop_group (char *G)
 Stop all processes in the group. More...

void stop_process (Process_T p)
 stop the process. More...

void dstop_process (char *P)
 Request the monit deamon to stop the process P. More...


Detailed Description

Methods for stopping processes managed by monit.

Author:
Jan-Henrik Haukeland, <hauk@tildeslash.com>
Version:
$Id: stop.c,v 1.10 2002/09/06 18:13:37 hauk Exp $

Definition in file stop.c.


Function Documentation

void dstop_process char *    P
 

Request the monit deamon to stop the process P.

Parameters:
P  A process name as stated in the config file

Definition at line 123 of file stop.c.

References myrun::bind_addr, close_socket(), myrun::controlfile, create_socket(), error(), exist_daemon(), exist_process(), get_basic_authentication_header(), get_process(), myrun::httpdport, is_process_running(), prog, Run, sock_send(), and stop_process().

Referenced by stop(), and stop_group().

void stop  
 

Stop all processes in the process list.

Definition at line 56 of file stop.c.

References dstop_process(), myprocess::name, myprocess::next, processlist, and myprocess::stop.

void stop_group char *    G
 

Stop all processes in the group.

Definition at line 72 of file stop.c.

References dstop_process(), myprocess::group, is, myprocess::name, myprocess::next, processlist, and myprocess::stop.

void stop_process Process_T    p
 

stop the process.

Parameters:
p  A Process_T object

Definition at line 93 of file stop.c.

References mycommand::arg, error(), is_process_running(), log(), myprocess::name, spawn(), and myprocess::stop.

Referenced by dstop_process().