diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-15 17:13:19 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-15 17:13:19 +0200 |
commit | bce2696b17f4891e819958ed9e8f1adf8bdd97dc (patch) | |
tree | 71df7b20c772e6fd2b9fc54233c76ba04b19282d /rc/bin/dontkill | |
parent | 5329fbf89e70270cc37c322f33984c5356b3c270 (diff) | |
download | plan9front-bce2696b17f4891e819958ed9e8f1adf8bdd97dc.tar.xz |
dontkill: only use noswap flag to mark processes as not to be terminated on oom
changing procmode has the nasty side effect that notes cannot
be posted to them, prventing sysfatal() and threadexitsall()
to cleanup properly.
recent kernels also check the noswap flag to void killing them
in out of memory condition, so this is really all we need now.
Diffstat (limited to 'rc/bin/dontkill')
-rwxr-xr-x | rc/bin/dontkill | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rc/bin/dontkill b/rc/bin/dontkill index 557bbd8fb..86395afad 100755 --- a/rc/bin/dontkill +++ b/rc/bin/dontkill @@ -7,8 +7,5 @@ if (! ~ $#* 1) { } # see /sys/src/9/port/proc.c:/^killbig psu | awk '$NF ~ /'$1'/ { -c="/proc/"$2"/ctl" -print "chmod +w "c -print "@{echo noswap >"c"}" -print "chmod -w "c +print "@{echo noswap >/proc/"$2"/ctl}" }' | rc >/dev/null >[2=1] |