Merge pull request #1598 from evverx/run-oomscoreadjust
systemd-run can launch units with OOMScoreAdjust
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <libintl.h>
|
||||
#include <limits.h>
|
||||
#include <linux/magic.h>
|
||||
#include <linux/oom.h>
|
||||
#include <linux/sched.h>
|
||||
#include <locale.h>
|
||||
#include <netinet/ip.h>
|
||||
@@ -6800,3 +6801,7 @@ bool fdname_is_valid(const char *s) {
|
||||
|
||||
return p - s < 256;
|
||||
}
|
||||
|
||||
bool oom_score_adjust_is_valid(int oa) {
|
||||
return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
|
||||
}
|
||||
|
||||
@@ -941,3 +941,5 @@ void nop_signal_handler(int sig);
|
||||
int version(void);
|
||||
|
||||
bool fdname_is_valid(const char *s);
|
||||
|
||||
bool oom_score_adjust_is_valid(int oa);
|
||||
|
||||
Reference in New Issue
Block a user