ominfra 0.0.0.dev130__tar.gz → 0.0.0.dev131__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. {ominfra-0.0.0.dev130/ominfra.egg-info → ominfra-0.0.0.dev131}/PKG-INFO +3 -3
  2. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/_executor.py +2 -2
  3. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/_main.py +2 -2
  4. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/pyremote/_runcommands.py +2 -2
  5. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/scripts/journald2aws.py +6 -6
  6. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/scripts/supervisor.py +94 -96
  7. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/configs.py +17 -17
  8. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/dispatchersimpl.py +8 -8
  9. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/pipes.py +2 -2
  10. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/privileges.py +4 -6
  11. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/processimpl.py +30 -30
  12. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/setupimpl.py +16 -16
  13. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/spawningimpl.py +1 -1
  14. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/supervisor.py +1 -1
  15. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/os.py +1 -1
  16. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/strings.py +2 -2
  17. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131/ominfra.egg-info}/PKG-INFO +3 -3
  18. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra.egg-info/requires.txt +2 -2
  19. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/pyproject.toml +3 -3
  20. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/LICENSE +0 -0
  21. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/MANIFEST.in +0 -0
  22. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/README.rst +0 -0
  23. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/.manifests.json +0 -0
  24. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/__about__.py +0 -0
  25. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/__init__.py +0 -0
  26. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/__init__.py +0 -0
  27. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/__init__.py +0 -0
  28. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/__main__.py +0 -0
  29. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/auth.py +0 -0
  30. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/cli.py +0 -0
  31. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/dataclasses.py +0 -0
  32. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
  33. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
  34. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
  35. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
  36. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/main.py +0 -0
  37. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
  38. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/logs.py +0 -0
  39. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/aws/metadata.py +0 -0
  40. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/gcp/__init__.py +0 -0
  41. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/clouds/gcp/auth.py +0 -0
  42. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/cmds.py +0 -0
  43. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/configs.py +0 -0
  44. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/__init__.py +0 -0
  45. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/configs.py +0 -0
  46. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/__init__.py +0 -0
  47. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/base.py +0 -0
  48. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/__init__.py +0 -0
  49. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/dirs.py +0 -0
  50. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/nginx.py +0 -0
  51. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/repo.py +0 -0
  52. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/supervisor.py +0 -0
  53. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/systemd.py +0 -0
  54. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/user.py +0 -0
  55. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/concerns/venv.py +0 -0
  56. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/executor/main.py +0 -0
  57. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/__init__.py +0 -0
  58. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/base.py +0 -0
  59. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/configs.py +0 -0
  60. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/deploy.py +0 -0
  61. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/main.py +0 -0
  62. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/nginx.py +0 -0
  63. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/repo.py +0 -0
  64. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/runtime.py +0 -0
  65. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/site.py +0 -0
  66. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/supervisor.py +0 -0
  67. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/poly/venv.py +0 -0
  68. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/deploy/remote.py +0 -0
  69. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/journald/__init__.py +0 -0
  70. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/journald/fields.py +0 -0
  71. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/journald/genmessages.py +0 -0
  72. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/journald/messages.py +0 -0
  73. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/journald/tailer.py +0 -0
  74. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/manage/__init__.py +0 -0
  75. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/manage/manage.py +0 -0
  76. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/pyremote/__init__.py +0 -0
  77. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/pyremote/bootstrap.py +0 -0
  78. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/pyremote/runcommands.py +0 -0
  79. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/scripts/__init__.py +0 -0
  80. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/ssh.py +0 -0
  81. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/LICENSE.txt +0 -0
  82. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/__init__.py +0 -0
  83. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/__main__.py +0 -0
  84. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/dispatchers.py +0 -0
  85. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/events.py +0 -0
  86. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/exceptions.py +0 -0
  87. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/groups.py +0 -0
  88. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/groupsimpl.py +0 -0
  89. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/http.py +0 -0
  90. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/inject.py +0 -0
  91. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/io.py +0 -0
  92. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/main.py +0 -0
  93. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/process.py +0 -0
  94. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/setup.py +0 -0
  95. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/signals.py +0 -0
  96. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/spawning.py +0 -0
  97. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/states.py +0 -0
  98. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/types.py +0 -0
  99. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/__init__.py +0 -0
  100. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/collections.py +0 -0
  101. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/diag.py +0 -0
  102. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/fds.py +0 -0
  103. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/fs.py +0 -0
  104. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/ostypes.py +0 -0
  105. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/signals.py +0 -0
  106. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/supervisor/utils/users.py +0 -0
  107. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/tailscale/__init__.py +0 -0
  108. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/tailscale/api.py +0 -0
  109. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/tailscale/cli.py +0 -0
  110. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/threadworkers.py +0 -0
  111. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/tools/__init__.py +0 -0
  112. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra/tools/listresources.py +0 -0
  113. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra.egg-info/SOURCES.txt +0 -0
  114. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra.egg-info/dependency_links.txt +0 -0
  115. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra.egg-info/entry_points.txt +0 -0
  116. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/ominfra.egg-info/top_level.txt +0 -0
  117. {ominfra-0.0.0.dev130 → ominfra-0.0.0.dev131}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev130
3
+ Version: 0.0.0.dev131
4
4
  Summary: ominfra
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: >=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omdev==0.0.0.dev130
16
- Requires-Dist: omlish==0.0.0.dev130
15
+ Requires-Dist: omdev==0.0.0.dev131
16
+ Requires-Dist: omlish==0.0.0.dev131
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -82,10 +82,10 @@ if sys.version_info < (3, 8):
82
82
  ########################################
83
83
 
84
84
 
85
- # ../../../../omlish/lite/cached.py
85
+ # ../../../omlish/lite/cached.py
86
86
  T = ta.TypeVar('T')
87
87
 
88
- # ../../../../omlish/lite/check.py
88
+ # ../../../omlish/lite/check.py
89
89
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
90
90
 
91
91
 
@@ -33,10 +33,10 @@ if sys.version_info < (3, 8):
33
33
  ########################################
34
34
 
35
35
 
36
- # ../../../../omlish/lite/cached.py
36
+ # ../../../omlish/lite/cached.py
37
37
  T = ta.TypeVar('T')
38
38
 
39
- # ../base.py
39
+ # base.py
40
40
  ConcernT = ta.TypeVar('ConcernT')
41
41
  ConfigT = ta.TypeVar('ConfigT')
42
42
  SiteConcernT = ta.TypeVar('SiteConcernT', bound='SiteConcern')
@@ -41,10 +41,10 @@ if sys.version_info < (3, 8):
41
41
  ########################################
42
42
 
43
43
 
44
- # ../../../omlish/lite/cached.py
44
+ # ../../omlish/lite/cached.py
45
45
  T = ta.TypeVar('T')
46
46
 
47
- # ../../../omlish/lite/check.py
47
+ # ../../omlish/lite/check.py
48
48
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
49
49
 
50
50
 
@@ -51,24 +51,24 @@ if sys.version_info < (3, 8):
51
51
  ########################################
52
52
 
53
53
 
54
- # ../../../../../omdev/toml/parser.py
54
+ # ../../../../omdev/toml/parser.py
55
55
  TomlParseFloat = ta.Callable[[str], ta.Any]
56
56
  TomlKey = ta.Tuple[str, ...]
57
57
  TomlPos = int # ta.TypeAlias
58
58
 
59
- # ../../../../../omlish/lite/cached.py
59
+ # ../../../../omlish/lite/cached.py
60
60
  T = ta.TypeVar('T')
61
61
 
62
- # ../../../../../omlish/lite/check.py
62
+ # ../../../../omlish/lite/check.py
63
63
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
64
64
 
65
- # ../../../../../omlish/lite/contextmanagers.py
65
+ # ../../../../omlish/lite/contextmanagers.py
66
66
  ExitStackedT = ta.TypeVar('ExitStackedT', bound='ExitStacked')
67
67
 
68
- # ../../../../configs.py
68
+ # ../../../configs.py
69
69
  ConfigMapping = ta.Mapping[str, ta.Any]
70
70
 
71
- # ../../../../threadworkers.py
71
+ # ../../../threadworkers.py
72
72
  ThreadWorkerT = ta.TypeVar('ThreadWorkerT', bound='ThreadWorker')
73
73
 
74
74
 
@@ -90,50 +90,50 @@ if sys.version_info < (3, 8):
90
90
  ########################################
91
91
 
92
92
 
93
- # ../../../omdev/toml/parser.py
93
+ # ../../omdev/toml/parser.py
94
94
  TomlParseFloat = ta.Callable[[str], ta.Any]
95
95
  TomlKey = ta.Tuple[str, ...]
96
96
  TomlPos = int # ta.TypeAlias
97
97
 
98
- # ../utils/collections.py
98
+ # utils/collections.py
99
99
  K = ta.TypeVar('K')
100
100
  V = ta.TypeVar('V')
101
101
 
102
- # ../../../omlish/lite/cached.py
102
+ # ../../omlish/lite/cached.py
103
103
  T = ta.TypeVar('T')
104
104
 
105
- # ../../../omlish/lite/check.py
105
+ # ../../omlish/lite/check.py
106
106
  SizedT = ta.TypeVar('SizedT', bound=ta.Sized)
107
107
 
108
- # ../../../omlish/lite/socket.py
108
+ # ../../omlish/lite/socket.py
109
109
  SocketAddress = ta.Any
110
110
  SocketHandlerFactory = ta.Callable[[SocketAddress, ta.BinaryIO, ta.BinaryIO], 'SocketHandler']
111
111
 
112
- # ../../../omlish/lite/typing.py
112
+ # ../../omlish/lite/typing.py
113
113
  A0 = ta.TypeVar('A0')
114
114
  A1 = ta.TypeVar('A1')
115
115
  A2 = ta.TypeVar('A2')
116
116
 
117
- # ../events.py
117
+ # events.py
118
118
  EventCallback = ta.Callable[['Event'], None]
119
119
 
120
- # ../../../omlish/lite/http/parsing.py
120
+ # ../../omlish/lite/http/parsing.py
121
121
  HttpHeaders = http.client.HTTPMessage # ta.TypeAlias
122
122
 
123
- # ../../../omlish/lite/inject.py
123
+ # ../../omlish/lite/inject.py
124
124
  U = ta.TypeVar('U')
125
125
  InjectorKeyCls = ta.Union[type, ta.NewType]
126
126
  InjectorProviderFn = ta.Callable[['Injector'], ta.Any]
127
127
  InjectorProviderFnMap = ta.Mapping['InjectorKey', 'InjectorProviderFn']
128
128
  InjectorBindingOrBindings = ta.Union['InjectorBinding', 'InjectorBindings']
129
129
 
130
- # ../../configs.py
130
+ # ../configs.py
131
131
  ConfigMapping = ta.Mapping[str, ta.Any]
132
132
 
133
- # ../../../omlish/lite/http/handlers.py
133
+ # ../../omlish/lite/http/handlers.py
134
134
  HttpHandler = ta.Callable[['HttpHandlerRequest'], 'HttpHandlerResponse']
135
135
 
136
- # ../../../omlish/lite/http/coroserver.py
136
+ # ../../omlish/lite/http/coroserver.py
137
137
  CoroHttpServerFactory = ta.Callable[[SocketAddress], 'CoroHttpServer']
138
138
 
139
139
 
@@ -991,9 +991,8 @@ class NoPermissionError(ProcessError):
991
991
 
992
992
  def drop_privileges(user: ta.Union[int, str, None]) -> ta.Optional[str]:
993
993
  """
994
- Drop privileges to become the specified user, which may be a username or uid. Called for supervisord startup
995
- and when spawning subprocesses. Returns None on success or a string error message if privileges could not be
996
- dropped.
994
+ Drop privileges to become the specified user, which may be a username or uid. Called for supervisord startup and
995
+ when spawning subprocesses. Returns None on success or a string error message if privileges could not be dropped.
997
996
  """
998
997
 
999
998
  if user is None:
@@ -1017,9 +1016,8 @@ def drop_privileges(user: ta.Union[int, str, None]) -> ta.Optional[str]:
1017
1016
  current_uid = os.getuid()
1018
1017
 
1019
1018
  if current_uid == uid:
1020
- # do nothing and return successfully if the uid is already the current one. this allows a supervisord
1021
- # running as an unprivileged user "foo" to start a process where the config has "user=foo" (same user) in
1022
- # it.
1019
+ # do nothing and return successfully if the uid is already the current one. this allows a supervisord running as
1020
+ # an unprivileged user "foo" to start a process where the config has "user=foo" (same user) in it.
1023
1021
  return None
1024
1022
 
1025
1023
  if current_uid != 0:
@@ -1373,8 +1371,8 @@ def strip_escapes(s: bytes) -> bytes:
1373
1371
 
1374
1372
 
1375
1373
  class SuffixMultiplier:
1376
- # d is a dictionary of suffixes to integer multipliers. If no suffixes match, default is the multiplier. Matches
1377
- # are case insensitive. Return values are in the fundamental unit.
1374
+ # d is a dictionary of suffixes to integer multipliers. If no suffixes match, default is the multiplier. Matches are
1375
+ # case insensitive. Return values are in the fundamental unit.
1378
1376
  def __init__(self, d, default=1):
1379
1377
  super().__init__()
1380
1378
  self._d = d
@@ -2430,7 +2428,7 @@ def decode_wait_status(sts: int) -> ta.Tuple[Rc, str]:
2430
2428
  Decode the status returned by wait() or waitpid().
2431
2429
 
2432
2430
  Return a tuple (exitstatus, message) where exitstatus is the exit status, or -1 if the process was killed by a
2433
- signal; and message is a message telling what happened. It is the caller's responsibility to display the message.
2431
+ signal; and message is a message telling what happened. It is the caller's responsibility to display the message.
2434
2432
  """
2435
2433
 
2436
2434
  if os.WIFEXITED(sts):
@@ -5068,8 +5066,8 @@ class ProcessPipes:
5068
5066
 
5069
5067
  def make_process_pipes(stderr=True) -> ProcessPipes:
5070
5068
  """
5071
- Create pipes for parent to child stdin/stdout/stderr communications. Open fd in non-blocking mode so we can
5072
- read them in the mainloop without blocking. If stderr is False, don't create a pipe for stderr.
5069
+ Create pipes for parent to child stdin/stdout/stderr communications. Open fd in non-blocking mode so we can read
5070
+ them in the mainloop without blocking. If stderr is False, don't create a pipe for stderr.
5073
5071
  """
5074
5072
 
5075
5073
  pipes: ta.Dict[str, ta.Optional[Fd]] = {
@@ -5219,32 +5217,32 @@ class ProcessConfig:
5219
5217
  umask: ta.Optional[int] = None
5220
5218
  priority: int = 999
5221
5219
 
5222
- autostart: bool = True
5223
- autorestart: str = 'unexpected'
5220
+ auto_start: bool = True
5221
+ auto_restart: str = 'unexpected'
5224
5222
 
5225
- startsecs: int = 1
5226
- startretries: int = 3
5223
+ start_secs: int = 1
5224
+ start_retries: int = 3
5227
5225
 
5228
- numprocs: int = 1
5229
- numprocs_start: int = 0
5226
+ num_procs: int = 1
5227
+ num_procs_start: int = 0
5230
5228
 
5231
5229
  @dc.dataclass(frozen=True)
5232
5230
  class Log:
5233
5231
  file: ta.Optional[str] = None
5234
- capture_maxbytes: ta.Optional[int] = None
5232
+ capture_max_bytes: ta.Optional[int] = None
5235
5233
  events_enabled: bool = False
5236
5234
  syslog: bool = False
5237
5235
  backups: ta.Optional[int] = None
5238
- maxbytes: ta.Optional[int] = None
5236
+ max_bytes: ta.Optional[int] = None
5239
5237
 
5240
5238
  stdout: Log = Log()
5241
5239
  stderr: Log = Log()
5242
5240
 
5243
- stopsignal: int = signal.SIGTERM
5244
- stopwaitsecs: int = 10
5245
- stopasgroup: bool = False
5241
+ stop_signal: int = signal.SIGTERM
5242
+ stop_wait_secs: int = 10
5243
+ stop_as_group: bool = False
5246
5244
 
5247
- killasgroup: bool = False
5245
+ kill_as_group: bool = False
5248
5246
 
5249
5247
  exitcodes: ta.Sequence[int] = (0,)
5250
5248
 
@@ -5269,14 +5267,14 @@ class ServerConfig:
5269
5267
  umask: int = 0o22
5270
5268
  directory: ta.Optional[str] = None
5271
5269
  logfile: str = 'supervisord.log'
5272
- logfile_maxbytes: int = 50 * 1024 * 1024
5270
+ logfile_max_bytes: int = 50 * 1024 * 1024
5273
5271
  logfile_backups: int = 10
5274
5272
  loglevel: int = logging.INFO
5275
5273
  pidfile: str = 'supervisord.pid'
5276
5274
  identifier: str = 'supervisor'
5277
5275
  child_logdir: str = '/dev/null'
5278
- minfds: int = 1024
5279
- minprocs: int = 200
5276
+ min_fds: int = 1024
5277
+ min_procs: int = 200
5280
5278
  nocleanup: bool = False
5281
5279
  strip_ansi: bool = False
5282
5280
  silent: bool = False
@@ -5289,7 +5287,7 @@ class ServerConfig:
5289
5287
  umask: ta.Union[int, str] = 0o22,
5290
5288
  directory: ta.Optional[str] = None,
5291
5289
  logfile: str = 'supervisord.log',
5292
- logfile_maxbytes: ta.Union[int, str] = 50 * 1024 * 1024,
5290
+ logfile_max_bytes: ta.Union[int, str] = 50 * 1024 * 1024,
5293
5291
  loglevel: ta.Union[int, str] = logging.INFO,
5294
5292
  pidfile: str = 'supervisord.pid',
5295
5293
  child_logdir: ta.Optional[str] = None,
@@ -5299,7 +5297,7 @@ class ServerConfig:
5299
5297
  umask=parse_octal(umask),
5300
5298
  directory=check_existing_dir(directory) if directory is not None else None,
5301
5299
  logfile=check_path_with_existing_dir(logfile),
5302
- logfile_maxbytes=parse_bytes_size(logfile_maxbytes),
5300
+ logfile_max_bytes=parse_bytes_size(logfile_max_bytes),
5303
5301
  loglevel=parse_logging_level(loglevel),
5304
5302
  pidfile=check_path_with_existing_dir(pidfile),
5305
5303
  child_logdir=child_logdir if child_logdir else tempfile.gettempdir(),
@@ -6360,7 +6358,7 @@ class ProcessOutputDispatcherImpl(BaseProcessDispatcherImpl, ProcessOutputDispat
6360
6358
  channel = self._channel # noqa
6361
6359
 
6362
6360
  logfile = self._lc.file
6363
- maxbytes = self._lc.maxbytes # noqa
6361
+ max_bytes = self._lc.max_bytes # noqa
6364
6362
  backups = self._lc.backups # noqa
6365
6363
  to_syslog = self._lc.syslog
6366
6364
 
@@ -6372,8 +6370,8 @@ class ProcessOutputDispatcherImpl(BaseProcessDispatcherImpl, ProcessOutputDispat
6372
6370
  # self.normal_log,
6373
6371
  # filename=logfile,
6374
6372
  # fmt='%(message)s',
6375
- # rotating=bool(maxbytes), # optimization
6376
- # maxbytes=maxbytes,
6373
+ # rotating=bool(max_bytes), # optimization
6374
+ # max_bytes=max_bytes,
6377
6375
  # backups=backups,
6378
6376
  # )
6379
6377
 
@@ -6385,17 +6383,17 @@ class ProcessOutputDispatcherImpl(BaseProcessDispatcherImpl, ProcessOutputDispat
6385
6383
 
6386
6384
  def _init_capture_log(self) -> None:
6387
6385
  """
6388
- Configure the capture log for this process. This log is used to temporarily capture output when special output
6386
+ Configure the capture log for this process. This log is used to temporarily capture output when special output
6389
6387
  is detected. Sets self.capture_log if capturing is enabled.
6390
6388
  """
6391
6389
 
6392
- capture_maxbytes = self._lc.capture_maxbytes
6393
- if capture_maxbytes:
6390
+ capture_max_bytes = self._lc.capture_max_bytes
6391
+ if capture_max_bytes:
6394
6392
  self._capture_log = logging.getLogger(__name__)
6395
6393
  # loggers.handle_boundIO(
6396
6394
  # self._capture_log,
6397
6395
  # fmt='%(message)s',
6398
- # maxbytes=capture_maxbytes,
6396
+ # max_bytes=capture_max_bytes,
6399
6397
  # )
6400
6398
 
6401
6399
  def remove_logs(self) -> None:
@@ -6508,7 +6506,7 @@ class ProcessOutputDispatcherImpl(BaseProcessDispatcherImpl, ProcessOutputDispat
6508
6506
  self._output_buffer += data
6509
6507
  self.record_output()
6510
6508
  if not data:
6511
- # if we get no data back from the pipe, it means that the child process has ended. See
6509
+ # if we get no data back from the pipe, it means that the child process has ended. See
6512
6510
  # mail.python.org/pipermail/python-dev/2004-August/046850.html
6513
6511
  self.close()
6514
6512
 
@@ -6717,21 +6715,21 @@ class SupervisorSetupImpl(SupervisorSetup):
6717
6715
  def _cleanup_fds(self) -> None:
6718
6716
  # try to close any leaked file descriptors (for reload)
6719
6717
  start = 5
6720
- os.closerange(start, self._config.minfds)
6718
+ os.closerange(start, self._config.min_fds)
6721
6719
 
6722
6720
  #
6723
6721
 
6724
6722
  def _set_uid_or_exit(self) -> None:
6725
6723
  """
6726
- Set the uid of the supervisord process. Called during supervisord startup only. No return value. Exits the
6724
+ Set the uid of the supervisord process. Called during supervisord startup only. No return value. Exits the
6727
6725
  process via usage() if privileges could not be dropped.
6728
6726
  """
6729
6727
 
6730
6728
  if self._user is None:
6731
6729
  if os.getuid() == 0:
6732
6730
  warnings.warn(
6733
- 'Supervisor is running as root. Privileges were not dropped because no user is specified in the '
6734
- 'config file. If you intend to run as root, you can set user=root in the config file to avoid '
6731
+ 'Supervisor is running as root. Privileges were not dropped because no user is specified in the '
6732
+ 'config file. If you intend to run as root, you can set user=root in the config file to avoid '
6735
6733
  'this message.',
6736
6734
  )
6737
6735
  else:
@@ -6745,8 +6743,8 @@ class SupervisorSetupImpl(SupervisorSetup):
6745
6743
 
6746
6744
  def _set_rlimits_or_exit(self) -> None:
6747
6745
  """
6748
- Set the rlimits of the supervisord process. Called during supervisord startup only. No return value. Exits
6749
- the process via usage() if any rlimits could not be set.
6746
+ Set the rlimits of the supervisord process. Called during supervisord startup only. No return value. Exits the
6747
+ process via usage() if any rlimits could not be set.
6750
6748
  """
6751
6749
 
6752
6750
  limits = []
@@ -6755,12 +6753,12 @@ class SupervisorSetupImpl(SupervisorSetup):
6755
6753
  limits.append({
6756
6754
  'msg': (
6757
6755
  'The minimum number of file descriptors required to run this process is %(min_limit)s as per the '
6758
- '"minfds" command-line argument or config file setting. The current environment will only allow '
6759
- 'you to open %(hard)s file descriptors. Either raise the number of usable file descriptors in '
6760
- 'your environment (see README.rst) or lower the minfds setting in the config file to allow the '
6756
+ '"min_fds" command-line argument or config file setting. The current environment will only allow '
6757
+ 'you to open %(hard)s file descriptors. Either raise the number of usable file descriptors in '
6758
+ 'your environment (see README.rst) or lower the min_fds setting in the config file to allow the '
6761
6759
  'process to start.'
6762
6760
  ),
6763
- 'min': self._config.minfds,
6761
+ 'min': self._config.min_fds,
6764
6762
  'resource': resource.RLIMIT_NOFILE,
6765
6763
  'name': 'RLIMIT_NOFILE',
6766
6764
  })
@@ -6770,11 +6768,11 @@ class SupervisorSetupImpl(SupervisorSetup):
6770
6768
  'msg': (
6771
6769
  'The minimum number of available processes required to run this program is %(min_limit)s as per '
6772
6770
  'the "minprocs" command-line argument or config file setting. The current environment will only '
6773
- 'allow you to open %(hard)s processes. Either raise the number of usable processes in your '
6771
+ 'allow you to open %(hard)s processes. Either raise the number of usable processes in your '
6774
6772
  'environment (see README.rst) or lower the minprocs setting in the config file to allow the '
6775
6773
  'program to start.'
6776
6774
  ),
6777
- 'min': self._config.minprocs,
6775
+ 'min': self._config.min_procs,
6778
6776
  'resource': resource.RLIMIT_NPROC,
6779
6777
  'name': 'RLIMIT_NPROC',
6780
6778
  })
@@ -6860,11 +6858,11 @@ class SupervisorSetupImpl(SupervisorSetup):
6860
6858
  dl.after_daemonize()
6861
6859
 
6862
6860
  def _do_daemonize(self) -> None:
6863
- # To daemonize, we need to become the leader of our own session (process) group. If we do not, signals sent to
6864
- # our parent process will also be sent to us. This might be bad because signals such as SIGINT can be sent to
6861
+ # To daemonize, we need to become the leader of our own session (process) group. If we do not, signals sent to
6862
+ # our parent process will also be sent to us. This might be bad because signals such as SIGINT can be sent to
6865
6863
  # our parent process during normal (uninteresting) operations such as when we press Ctrl-C in the parent
6866
6864
  # terminal window to escape from a logtail command. To disassociate ourselves from our parent's session group we
6867
- # use os.setsid. It means "set session id", which has the effect of disassociating a process from is current
6865
+ # use os.setsid. It means "set session id", which has the effect of disassociating a process from is current
6868
6866
  # session and process group and setting itself up as a new session leader.
6869
6867
  #
6870
6868
  # Unfortunately we cannot call setsid if we're already a session group leader, so we use "fork" to make a copy
@@ -6896,7 +6894,7 @@ class SupervisorSetupImpl(SupervisorSetup):
6896
6894
  os.dup2(2, os.open('/dev/null', os.O_WRONLY))
6897
6895
 
6898
6896
  # XXX Stevens, in his Advanced Unix book, section 13.3 (page 417) recommends calling umask(0) and closing unused
6899
- # file descriptors. In his Network Programming book, he additionally recommends ignoring SIGHUP and forking
6897
+ # file descriptors. In his Network Programming book, he additionally recommends ignoring SIGHUP and forking
6900
6898
  # again after the setsid() call, for obscure SVR4 reasons.
6901
6899
  os.setsid()
6902
6900
  os.umask(self._config.umask)
@@ -7275,7 +7273,7 @@ class ProcessImpl(Process):
7275
7273
 
7276
7274
  self._killing = False # true if we are trying to kill this process
7277
7275
 
7278
- self._backoff = 0 # backoff counter (to startretries)
7276
+ self._backoff = 0 # backoff counter (to start_retries)
7279
7277
 
7280
7278
  self._exitstatus: ta.Optional[Rc] = None # status attached to dead process by finish()
7281
7279
  self._spawn_err: ta.Optional[str] = None # error message attached by spawn() if any
@@ -7352,7 +7350,7 @@ class ProcessImpl(Process):
7352
7350
  self._pipes = sp.pipes
7353
7351
  self._dispatchers = sp.dispatchers
7354
7352
 
7355
- self._delay = time.time() + self.config.startsecs
7353
+ self._delay = time.time() + self.config.start_secs
7356
7354
 
7357
7355
  return sp.pid
7358
7356
 
@@ -7410,17 +7408,17 @@ class ProcessImpl(Process):
7410
7408
 
7411
7409
  if self._state == ProcessState.STARTING:
7412
7410
  self._last_start = min(test_time, self._last_start)
7413
- if self._delay > 0 and test_time < (self._delay - self._config.startsecs):
7414
- self._delay = test_time + self._config.startsecs
7411
+ if self._delay > 0 and test_time < (self._delay - self._config.start_secs):
7412
+ self._delay = test_time + self._config.start_secs
7415
7413
 
7416
7414
  elif self._state == ProcessState.RUNNING:
7417
- if test_time > self._last_start and test_time < (self._last_start + self._config.startsecs):
7418
- self._last_start = test_time - self._config.startsecs
7415
+ if test_time > self._last_start and test_time < (self._last_start + self._config.start_secs):
7416
+ self._last_start = test_time - self._config.start_secs
7419
7417
 
7420
7418
  elif self._state == ProcessState.STOPPING:
7421
7419
  self._last_stop_report = min(test_time, self._last_stop_report)
7422
- if self._delay > 0 and test_time < (self._delay - self._config.stopwaitsecs):
7423
- self._delay = test_time + self._config.stopwaitsecs
7420
+ if self._delay > 0 and test_time < (self._delay - self._config.stop_wait_secs):
7421
+ self._delay = test_time + self._config.stop_wait_secs
7424
7422
 
7425
7423
  elif self._state == ProcessState.BACKOFF:
7426
7424
  if self._delay > 0 and test_time < (self._delay - self._backoff):
@@ -7429,7 +7427,7 @@ class ProcessImpl(Process):
7429
7427
  def stop(self) -> ta.Optional[str]:
7430
7428
  self._administrative_stop = True
7431
7429
  self._last_stop_report = 0
7432
- return self.kill(self._config.stopsignal)
7430
+ return self.kill(self._config.stop_signal)
7433
7431
 
7434
7432
  def stop_report(self) -> None:
7435
7433
  """Log a 'waiting for x to stop' message with throttling."""
@@ -7452,7 +7450,7 @@ class ProcessImpl(Process):
7452
7450
 
7453
7451
  def kill(self, sig: int) -> ta.Optional[str]:
7454
7452
  """
7455
- Send a signal to the subprocess with the intention to kill it (to make it exit). This may or may not actually
7453
+ Send a signal to the subprocess with the intention to kill it (to make it exit). This may or may not actually
7456
7454
  kill it.
7457
7455
 
7458
7456
  Return None if the signal was sent, or an error message string if an error occurred or if the subprocess is not
@@ -7460,8 +7458,8 @@ class ProcessImpl(Process):
7460
7458
  """
7461
7459
  now = time.time()
7462
7460
 
7463
- # If the process is in BACKOFF and we want to stop or kill it, then BACKOFF -> STOPPED. This is needed because
7464
- # if startretries is a large number and the process isn't starting successfully, the stop request would be
7461
+ # If the process is in BACKOFF and we want to stop or kill it, then BACKOFF -> STOPPED. This is needed because
7462
+ # if start_retries is a large number and the process isn't starting successfully, the stop request would be
7465
7463
  # blocked for a long time waiting for the retries.
7466
7464
  if self._state == ProcessState.BACKOFF:
7467
7465
  log.debug('Attempted to kill %s, which is in BACKOFF state.', self.name)
@@ -7476,25 +7474,25 @@ class ProcessImpl(Process):
7476
7474
 
7477
7475
  # If we're in the stopping state, then we've already sent the stop signal and this is the kill signal
7478
7476
  if self._state == ProcessState.STOPPING:
7479
- killasgroup = self._config.killasgroup
7477
+ kill_as_group = self._config.kill_as_group
7480
7478
  else:
7481
- killasgroup = self._config.stopasgroup
7479
+ kill_as_group = self._config.stop_as_group
7482
7480
 
7483
7481
  as_group = ''
7484
- if killasgroup:
7482
+ if kill_as_group:
7485
7483
  as_group = 'process group '
7486
7484
 
7487
7485
  log.debug('killing %s (pid %s) %s with signal %s', self.name, self.pid, as_group, sig_name(sig))
7488
7486
 
7489
7487
  # RUNNING/STARTING/STOPPING -> STOPPING
7490
7488
  self._killing = True
7491
- self._delay = now + self._config.stopwaitsecs
7492
- # we will already be in the STOPPING state if we're doing a SIGKILL as a result of overrunning stopwaitsecs
7489
+ self._delay = now + self._config.stop_wait_secs
7490
+ # we will already be in the STOPPING state if we're doing a SIGKILL as a result of overrunning stop_wait_secs
7493
7491
  self.check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
7494
7492
  self.change_state(ProcessState.STOPPING)
7495
7493
 
7496
7494
  kpid = int(self.pid)
7497
- if killasgroup:
7495
+ if kill_as_group:
7498
7496
  # send to the whole process group instead
7499
7497
  kpid = -kpid
7500
7498
 
@@ -7504,7 +7502,7 @@ class ProcessImpl(Process):
7504
7502
  except OSError as exc:
7505
7503
  if exc.errno == errno.ESRCH:
7506
7504
  log.debug('unable to signal %s (pid %s), it probably just exited on its own: %s', self.name, self.pid, str(exc)) # noqa
7507
- # we could change the state here but we intentionally do not. we will do it during normal SIGCHLD
7505
+ # we could change the state here but we intentionally do not. we will do it during normal SIGCHLD
7508
7506
  # processing.
7509
7507
  return None
7510
7508
  raise
@@ -7547,7 +7545,7 @@ class ProcessImpl(Process):
7547
7545
  self.pid,
7548
7546
  str(exc),
7549
7547
  )
7550
- # we could change the state here but we intentionally do not. we will do it during normal SIGCHLD
7548
+ # we could change the state here but we intentionally do not. we will do it during normal SIGCHLD
7551
7549
  # processing.
7552
7550
  return None
7553
7551
  raise
@@ -7575,7 +7573,7 @@ class ProcessImpl(Process):
7575
7573
 
7576
7574
  if now > self._last_start:
7577
7575
  log.info(f'{now - self._last_start=}') # noqa
7578
- too_quickly = now - self._last_start < self._config.startsecs
7576
+ too_quickly = now - self._last_start < self._config.start_secs
7579
7577
  else:
7580
7578
  too_quickly = False
7581
7579
  log.warning(
@@ -7647,8 +7645,8 @@ class ProcessImpl(Process):
7647
7645
  if self._supervisor_states.state > SupervisorState.RESTARTING:
7648
7646
  # dont start any processes if supervisor is shutting down
7649
7647
  if state == ProcessState.EXITED:
7650
- if self._config.autorestart:
7651
- if self._config.autorestart is RestartUnconditionally:
7648
+ if self._config.auto_restart:
7649
+ if self._config.auto_restart is RestartUnconditionally:
7652
7650
  # EXITED -> STARTING
7653
7651
  self.spawn()
7654
7652
  elif self._exitstatus not in self._config.exitcodes:
@@ -7656,29 +7654,29 @@ class ProcessImpl(Process):
7656
7654
  self.spawn()
7657
7655
 
7658
7656
  elif state == ProcessState.STOPPED and not self._last_start:
7659
- if self._config.autostart:
7657
+ if self._config.auto_start:
7660
7658
  # STOPPED -> STARTING
7661
7659
  self.spawn()
7662
7660
 
7663
7661
  elif state == ProcessState.BACKOFF:
7664
- if self._backoff <= self._config.startretries:
7662
+ if self._backoff <= self._config.start_retries:
7665
7663
  if now > self._delay:
7666
7664
  # BACKOFF -> STARTING
7667
7665
  self.spawn()
7668
7666
 
7669
7667
  if state == ProcessState.STARTING:
7670
- if now - self._last_start > self._config.startsecs:
7668
+ if now - self._last_start > self._config.start_secs:
7671
7669
  # STARTING -> RUNNING if the proc has started successfully and it has stayed up for at least
7672
- # proc.config.startsecs,
7670
+ # proc.config.start_secs,
7673
7671
  self._delay = 0
7674
7672
  self._backoff = 0
7675
7673
  self.check_in_state(ProcessState.STARTING)
7676
7674
  self.change_state(ProcessState.RUNNING)
7677
- msg = ('entered RUNNING state, process has stayed up for > than %s seconds (startsecs)' % self._config.startsecs) # noqa
7675
+ msg = ('entered RUNNING state, process has stayed up for > than %s seconds (start_secs)' % self._config.start_secs) # noqa
7678
7676
  log.info('success: %s %s', self.name, msg)
7679
7677
 
7680
7678
  if state == ProcessState.BACKOFF:
7681
- if self._backoff > self._config.startretries:
7679
+ if self._backoff > self._config.start_retries:
7682
7680
  # BACKOFF -> FATAL if the proc has exceeded its number of retries
7683
7681
  self.give_up()
7684
7682
  msg = ('entered FATAL state, too many start retries too quickly')
@@ -7687,7 +7685,7 @@ class ProcessImpl(Process):
7687
7685
  elif state == ProcessState.STOPPING:
7688
7686
  time_left = self._delay - now
7689
7687
  if time_left <= 0:
7690
- # kill processes which are taking too long to stop with a final sigkill. if this doesn't kill it, the
7688
+ # kill processes which are taking too long to stop with a final sigkill. if this doesn't kill it, the
7691
7689
  # process will be stuck in the STOPPING state forever.
7692
7690
  log.warning('killing \'%s\' (%s) with SIGKILL', self.name, self.pid)
7693
7691
  self.kill(signal.SIGKILL)
@@ -8039,7 +8037,7 @@ class ProcessSpawningImpl(ProcessSpawning):
8039
8037
  else:
8040
8038
  os.dup2(check_not_none(pipes.child_stderr), 2)
8041
8039
 
8042
- for i in range(3, self._server_config.minfds):
8040
+ for i in range(3, self._server_config.min_fds):
8043
8041
  if i in self._inherited_fds:
8044
8042
  continue
8045
8043
  close_fd(Fd(i))
@@ -8329,7 +8327,7 @@ class WaitedPid(ta.NamedTuple):
8329
8327
 
8330
8328
 
8331
8329
  def waitpid() -> ta.Optional[WaitedPid]:
8332
- # Need pthread_sigmask here to avoid concurrent sigchld, but Python doesn't offer in Python < 3.4. There is
8330
+ # Need pthread_sigmask here to avoid concurrent sigchld, but Python doesn't offer in Python < 3.4. There is
8333
8331
  # still a race condition here; we can get a sigchld while we're sitting in the waitpid call. However, AFAICT, if
8334
8332
  # waitpid is interrupted by SIGCHLD, as long as we call waitpid again (which happens every so often during the
8335
8333
  # normal course in the mainloop), we'll eventually reap the child that we tried to reap during the interrupted