Skip to content

kill: implement an option for trigger kernel oom killer#362

Open
IceLocke wants to merge 3 commits intorfjakob:masterfrom
IceLocke:master
Open

kill: implement an option for trigger kernel oom killer#362
IceLocke wants to merge 3 commits intorfjakob:masterfrom
IceLocke:master

Conversation

@IceLocke
Copy link

@IceLocke IceLocke commented Feb 2, 2026

As mentioned in issue #358 and README, after Linux 5.17, OOM sysrq will always kill a process.

This implements an option for trigger the kernel oom killer i.e. write an f to /proc/sysrq-trigger. Since the victim cannot be chosen by earlyoom, some of the features about customized victim selection won't take effect.

@hunshcn
Copy link

hunshcn commented Feb 9, 2026

@rfjakob PTAL

return 0;
}

int fd = open(sysrq_path, O_WRONLY);

Check failure

Code scanning / CodeQL

Time-of-check time-of-use filesystem race condition High

The
filename
being operated upon was previously
checked
, but the underlying file may have been changed since then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants