From 5773014116db4118a775598024964b6c469bd122 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 20 May 2020 13:52:18 +0100 Subject: [PATCH 14/28] core-out-of-memory: return EXIT_NO_RESOUCE on --oomable option (LP: #1879696) Don't call _exit() in a child stressor as this stops the bogo ops metrics being propagated back to the parent stress-ng mail program. Instead, return with EXIT_NO_RESOURCE to indicate process got OOM'd because of being out of memory resources. Signed-off-by: Colin Ian King --- core-out-of-memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-out-of-memory.c b/core-out-of-memory.c index 893d7d0e4352..1f397b392f1a 100644 --- a/core-out-of-memory.c +++ b/core-out-of-memory.c @@ -222,7 +222,7 @@ again: "killer, bailing out " "(instance %d)\n", args->name, args->instance); - _exit(0); + return EXIT_NO_RESOURCE; } else { stress_log_system_mem_info(); pr_dbg("%s: assuming killed by OOM " -- 2.21.3