def decode_wait_status(sts):
    if os.WIFEXITED(sts):
        es = os.WEXITSTATUS(sts) & 0xffff
        msg = "exit status %s" % es
        return es, msg
    elif os.WIFSIGNALED(sts):
        sig = os.WTERMSIG(sts)
        msg = "terminated by %s" % signame(sig)
        if hasattr(os, "WCOREDUMP"):
            iscore = os.WCOREDUMP(sts)
        else:
            iscore = sts & 0x80
        if iscore:
            msg += " (core dumped)"
        return -1, msg
    else:
        msg = "unknown termination cause 0x%04x" % sts
        return -1, msg
PARAM:
dataset/ETHPy150Open XiaoMi/minos/supervisor/supervisor/options.py/decode_wait_status--crossover with--dataset/ETHPy150Open hycis/Mozi/mozi/layers/noise.py/BatchOut.__init__