Return code when OOM killer kills a process

后端 未结 1 864
[愿得一人]
[愿得一人] 2020-12-03 22:51

I am running a multiprogrammed workload (based on SPEC CPU2006 benchmarks) on a POWER7 system using SUSE SLES 11.

Sometimes, each application in the workload consumes

相关标签:
1条回答
  • 2020-12-03 23:02

    The Linux OOM killer works by sending SIGKILL. If your process is killed by the OOM it's fishy that WIFEXITED returns 1.

    TLPI

    To kill the selected process, the OOM killer delivers a SIGKILL signal.

    So you should be able to test this using:

    if (WIFSIGNALED(status)) {
        if (WTERMSIG(status) == SIGKILL)
            printf("Killed by SIGKILL\n");
    }
    
    0 讨论(0)
提交回复
热议问题