albertr@sharky:/mnt/net/zaurus/src$ ./survive -h
usage: survive [ [-i] [-l <level>] command ...]
When kernel is compiled with CONFIG_OOM_KILL_SURVIVAL=y option,
if memory becomes dangerously low, instead of panicing, kernel
will try to free up memory by killing processes.
The processes to be killed will be choosen based on their survival
level, where:
0 - no survival level was set (most likely to be killed)
15 - lowest level (more likely to be killed)
...
1 - highest level (least likely to be killed)
The survival level is set with the \"-l\" option.
The \"-i\" option (if provided) direct child processes to inherit
the survival level of the parent.
-albertr
Here\'s an example:
albertr@sharky:/mnt/net/zaurus/src$ ./survive
survive: current inherit: 1, level: 5
albertr@sharky:/mnt/net/zaurus/src$ ./survive -i -l 10 bash
survive: changing to inherit: 1, level: 10
survive: executing command: bash
albertr@sharky:/mnt/net/zaurus/src$ ./survive
survive: current inherit: 1, level: 10
albertr@sharky:/mnt/net/zaurus/src$ exit
exit
albertr@sharky:/mnt/net/zaurus/src$ ./survive
survive: current inherit: 1, level: 5
albertr@sharky:/mnt/net/zaurus/src$
-albertr