blob: da8210ab8f79cb26b8f9ced7c1a1ccfd1287b0e9 [file] [log] [blame]
// Copyright 2018 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "login_manager/child_exit_handler.h"
#include <string.h>
#include <base/strings/stringprintf.h>
namespace login_manager {
// static
std::string ChildExitHandler::GetExitDescription(const siginfo_t& status) {
return status.si_code == CLD_EXITED
? base::StringPrintf("exit code %d", status.si_status)
: base::StringPrintf("signal %d (%s)", status.si_status,
strsignal(status.si_status));
}
} // namespace login_manager