blob: 6b4a6eb932cefccc63476764acaabd7737c8faaa [file] [log] [blame]
// Copyright 2020 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.process.lifecycle;
/// A component can implement the Lifecycle protocol to be notified of lifecycle
/// events. The ELF Runner uses this protocol to communicate lifecycle changes
/// to the component, for more details on how it uses this protocol see:
protocol Lifecycle {
/// The process must clean up its state in preparation for termination, and
/// must close the channel hosting the `Lifecycle` protocol when it is
/// ready to be terminated. The process should exit after it completes its
/// cleanup. At the discretion of the system the process may be terminated
/// before it closes the `Lifecycle` channel.