aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/system/exit.h
blob: 6c009fff901b37c75c5c8329fada559175e002e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <library/cpp/yt/misc/enum.h>

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

DEFINE_ENUM(EProcessExitCode,
    ((OK)                  (0))
    ((ArgumentsError)      (1))
    ((GenericError)        (2))
    ((IOError)             (3))
    ((OutOfMemory)         (9))
);

//! Invokes _exit to abort the process immediately without calling any cleanup code.
[[noreturn]] void AbortProcess(int exitCode);

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT