proc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <library/cpp/yt/misc/enum.h>
  3. #include <errno.h>
  4. namespace NYT {
  5. ////////////////////////////////////////////////////////////////////////////////
  6. //! NYT::TError::FromSystem adds this value to a system errno. The enum
  7. //! below lists several errno's that are used in our code.
  8. constexpr int LinuxErrorCodeBase = 4200;
  9. constexpr int LinuxErrorCodeCount = 2000;
  10. DEFINE_ENUM(ELinuxErrorCode,
  11. ((NOENT) ((LinuxErrorCodeBase + ENOENT)))
  12. ((IO) ((LinuxErrorCodeBase + EIO)))
  13. ((ACCESS) ((LinuxErrorCodeBase + EACCES)))
  14. ((NFILE) ((LinuxErrorCodeBase + ENFILE)))
  15. ((MFILE) ((LinuxErrorCodeBase + EMFILE)))
  16. ((NOSPC) ((LinuxErrorCodeBase + ENOSPC)))
  17. ((PIPE) ((LinuxErrorCodeBase + EPIPE)))
  18. ((CONNRESET) ((LinuxErrorCodeBase + ECONNRESET)))
  19. ((TIMEDOUT) ((LinuxErrorCodeBase + ETIMEDOUT)))
  20. ((CONNREFUSED) ((LinuxErrorCodeBase + ECONNREFUSED)))
  21. ((DQUOT) ((LinuxErrorCodeBase + EDQUOT)))
  22. );
  23. ////////////////////////////////////////////////////////////////////////////////
  24. } // namespace NYT