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
1=== modified file 'NEWS.rst'
2--- NEWS.rst 2022-09-01 00:01:34 +0000
3+++ NEWS.rst 2022-09-01 11:50:31 +0000
4@@ -8,6 +8,7 @@
5 - Only send ``SIGTERM`` once while stopping ``RabbitServerRunner``, since
6 it's sent to the whole process group and that can itself interfere with
7 the shutdown process if we send it frequently and repeatedly.
8+- Fix ignoring of ``ESRCH`` errors in ``RabbitServerRunner._signal``.
9
10 0.5.1 (2022-07-22)
11 ==================
12
13=== modified file 'rabbitfixture/server.py'
14--- rabbitfixture/server.py 2022-09-01 00:01:34 +0000
15+++ rabbitfixture/server.py 2022-09-01 11:50:31 +0000
16@@ -471,9 +471,8 @@
17 try:
18 os.killpg(os.getpgid(self.process.pid), code)
19 except OSError as e:
20- if e.errno == errno.ESRCH:
21- pass
22- raise
23+ if e.errno != errno.ESRCH:
24+ raise
25
26
27 class RabbitServer(Fixture):

Subscribers

People subscribed via source and target branches

to all changes: