Class: God::Process

Class | God::Process
In: | lib/god/process.rb
Parent: | Object

### Methods

alive? call_action default_pid_file ensure_stop file_writable? new pid pid_file pid_file= restart! spawn start! stop! valid?

### Constants

WRITES_PID | = | [:start, :restart]

### Attributes

gid | [RW] |
log | [RW] |
name | [RW] |
restart | [RW] |
start | [RW] |
stop | [RW] |
uid | [RW] |

### Public Class methods

new()

### Public Instance methods

alive?()
call_action(action)
default_pid_file()
ensure_stop()

Ensure that a stop command actually stops the process. Force kill if necessary.

Returns nothing

file_writable?(file)
pid()

Fetch the PID from pid_file. If the pid_file does not exist, then use the PID from the last time it was read. If it has never been read, then return nil.

Returns Integer(pid) or nil

pid_file()
pid_file=(value)

DON‘T USE THIS INTERNALLY. Use the instance variable. — Kev No really, trust me. Use the instance variable.

restart!()
spawn(command)

Fork/exec the given command, returns immediately

      +command+ is the String containing the shell command

Returns nothing

start!()
stop!()
valid?()

[Validate]