File: README

package info (click to toggle)
run 0.9.2-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 280 kB
  • ctags: 44
  • sloc: ansic: 773; sh: 339; makefile: 56
file content (58 lines) | stat: -rw-r--r-- 1,795 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Run
===

Run allows you to run a program, and ensure that you have only
one of that program running simultaneously. i.e. we would like to
run some program, but not if its already running. We also may
need to restart the program if it dies. Run accomplishes these
tasks giving all the functionality that would otherwise require
tedious shell scripting to accomplish.

Features:
=========

    * Watch programs and restart them if they die.

    * Get the process id of programs started with `run'.

    * Do no more that x restarts per second.

    * Programs can be stopped from a separate session; also
        returning the programs exit status.

    * Fork into the background to run daemon processes.

These utilities properly use shared file locking and Sys V IPC to
achieve their functionality. They are hence efficient and clean
implementations of what is done usually in Unix startup scripts.

Uses:
=====

It would be really nice if all startup scripts made use of `run'
to start daemon process. It would then be really easy to get pid's
and stop daemons *and* *be* *sure* *that* *they* *are* *stopped*.
See the man page for an example.

Soap:
=====

Currently a deficiency exists when trying to write simple shell
scripts to monitor processes. There is no simple way of ensuring
that a program has only a single running copy. There is also no
simple way of killing a process by name, and ensuring that it has
died, or establishing if a daemon is alive, or establishing the
process id of a daemon.

The usual way of checking if a process is alive is something like:
    ps awx | grep <program> | grep -v grep
This method is cumbersome, CPU intensive, and unreliable.

`run' package cleanly solves all of these problems.

Availability:
=============

ftp://ftp.obsidian.co.za/pub/run/