Merge lp:~cjwatson/rabbitfixture/fix-esrch-handling into lp:rabbitfixture

Proposed by Colin Watson
Status: Merged
Merged at revision: 58
Proposed branch: lp:~cjwatson/rabbitfixture/fix-esrch-handling
Merge into: lp:rabbitfixture
Diff against target: 27 lines (+3/-3)
2 files modified
NEWS.rst (+1/-0)
rabbitfixture/server.py (+2/-3)
To merge this branch: bzr merge lp:~cjwatson/rabbitfixture/fix-esrch-handling
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+429291@code.launchpad.net

Commit message

Fix ignoring of ESRCH errors in RabbitServerRunner._signal.

Description of the change

"If ESRCH do nothing and then raise anyway" is not quite what I meant to type.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm going to go ahead and self-approve this, since it's a very straightforward logic fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS.rst'
--- NEWS.rst 2022-09-01 00:01:34 +0000
+++ NEWS.rst 2022-09-01 11:50:31 +0000
@@ -8,6 +8,7 @@
8- Only send ``SIGTERM`` once while stopping ``RabbitServerRunner``, since8- Only send ``SIGTERM`` once while stopping ``RabbitServerRunner``, since
9 it's sent to the whole process group and that can itself interfere with9 it's sent to the whole process group and that can itself interfere with
10 the shutdown process if we send it frequently and repeatedly.10 the shutdown process if we send it frequently and repeatedly.
11- Fix ignoring of ``ESRCH`` errors in ``RabbitServerRunner._signal``.
1112
120.5.1 (2022-07-22)130.5.1 (2022-07-22)
13==================14==================
1415
=== modified file 'rabbitfixture/server.py'
--- rabbitfixture/server.py 2022-09-01 00:01:34 +0000
+++ rabbitfixture/server.py 2022-09-01 11:50:31 +0000
@@ -471,9 +471,8 @@
471 try:471 try:
472 os.killpg(os.getpgid(self.process.pid), code)472 os.killpg(os.getpgid(self.process.pid), code)
473 except OSError as e:473 except OSError as e:
474 if e.errno == errno.ESRCH:474 if e.errno != errno.ESRCH:
475 pass475 raise
476 raise
477476
478477
479class RabbitServer(Fixture):478class RabbitServer(Fixture):

Subscribers

People subscribed via source and target branches

to all changes: