File tree Expand file tree Collapse file tree 7 files changed +28
-6
lines changed Expand file tree Collapse file tree 7 files changed +28
-6
lines changed Original file line number Diff line number Diff line change
1
+ 1.1-23 | 2024-12-04 19:18:04 +0100
2
+
3
+ * btest-setsid: Fail on setsid() error (Arne Welzel, Corelight)
4
+
5
+ * btest-bg-run-helper: Ignore SIGTERM to self during cleanup (Arne Welzel, Corelight)
6
+
7
+ The kill 0 invocation would kill the btest-bg-run-helper itself,
8
+ causing the subsequent logic to not be executed, resulting in
9
+ runaway processes on the system.
10
+
1
11
1.1-20 | 2024-12-04 08:46:27 -0700
2
12
3
13
* Fix ruff UP check findings (Tim Wojtulewicz, Corelight)
Original file line number Diff line number Diff line change 2
2
..
3
3
.. Version number is filled in automatically.
4
4
5
- .. |version| replace:: 1.1-20
5
+ .. |version| replace:: 1.1-23
6
6
7
7
==================================================
8
8
BTest - A Generic Driver for Powerful System Tests
Original file line number Diff line number Diff line change 1
- 1.1-20
1
+ 1.1-23
Original file line number Diff line number Diff line change 56
56
import multiprocessing .managers as mp_managers
57
57
import multiprocessing .sharedctypes as mp_sharedctypes
58
58
59
- VERSION = "1.1-20 " # Automatically filled in.
59
+ VERSION = "1.1-23 " # Automatically filled in.
60
60
61
61
Name = "btest"
62
62
Config = None
Original file line number Diff line number Diff line change 3
3
# Internal helper for btest-bg-run.
4
4
5
5
cleanup () {
6
+ # Ignore SIGTERM during cleanup to prevent terminating
7
+ # this process when sending signals to the process group.
8
+ trap true SIGTERM
9
+
6
10
if [ ! -e .exitcode ]; then
7
11
echo 15 > .exitcode
12
+
13
+ # Send SIGTERM to all processes in the process group
14
+ # of the calling process.
15
+ #
16
+ # This should terminate any well-behaved background
17
+ # commands that were spawned by the program under test
18
+ # unless they started their own process group.
8
19
kill 0 & > /dev/null
9
20
10
21
if [ -n " $pid " ]; then
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ import sys
5
5
6
6
try :
7
7
os .setsid ()
8
- except Exception :
9
- pass
8
+ except Exception as e :
9
+ print (f"btest-setsid failed: { e !r} " , file = sys .stderr )
10
+ exit (1 )
10
11
11
12
prog = sys .argv [1 ]
12
13
args = sys .argv [1 :]
Original file line number Diff line number Diff line change 5
5
py_modules = ["btest-sphinx" ]
6
6
7
7
setup (
8
- version = "1.1.dev20 " , # Filled in automatically.
8
+ version = "1.1.dev23 " , # Filled in automatically.
9
9
py_modules = py_modules ,
10
10
)
You can’t perform that action at this time.
0 commit comments