File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1160,6 +1160,7 @@ def cleanup(self):
11601160 socketname = config ['file' ]
11611161 self ._try_unlink (socketname )
11621162 self ._try_unlink (self .pidfile )
1163+ self .poller .close ()
11631164
11641165 def _try_unlink (self , path ):
11651166 try :
@@ -2189,4 +2190,3 @@ class NoPermission(ProcessException):
21892190 """ Indicates that the file cannot be executed because the supervisor
21902191 process does not possess the appropriate UNIX filesystem permission
21912192 to execute the file. """
2192-
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ def before_daemonize(self):
2828 def after_daemonize (self ):
2929 pass
3030
31+ def close (self ):
32+ pass
33+
3134
3235class SelectPoller (BasePoller ):
3336
@@ -189,8 +192,7 @@ def poll(self, timeout):
189192 return readables , writables
190193
191194 def before_daemonize (self ):
192- self ._kqueue .close ()
193- self ._kqueue = None
195+ self .close ()
194196
195197 def after_daemonize (self ):
196198 self ._kqueue = select .kqueue ()
@@ -199,6 +201,10 @@ def after_daemonize(self):
199201 for fd in self .writables :
200202 self .register_writable (fd )
201203
204+ def close (self ):
205+ self ._kqueue .close ()
206+ self ._kqueue = None
207+
202208def implements_poll ():
203209 return hasattr (select , 'poll' )
204210
You can’t perform that action at this time.
0 commit comments