Skip to content

Commit 22ebf34

Browse files
committed
Fix a typo in Watchdog.cpp causing it to write to a /proc/self/oom_adj even though it's opened read-only.
1 parent c6fef29 commit 22ebf34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/common/Watchdog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ setOomScore(const StaticString &score) {
800800
FILE *f;
801801
OomFileType type;
802802

803-
f = openOomAdjFile("r", type);
803+
f = openOomAdjFile("w", type);
804804
if (f != NULL) {
805805
fwrite(score.data(), 1, score.size(), f);
806806
fclose(f);

0 commit comments

Comments
 (0)