diff options
| author | Qingshuang Fu <fuqingshuang@kylinos.cn> | 2026-08-21 11:14:41 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-08-24 11:40:25 -0700 |
| commit | 2d83aa65dc983368ce14f1a1daa05ca56d38ab5c (patch) | |
| tree | 5a69f5b6ddbaf673209e7fb9e35fea4b707901ce /tools/perf/scripts/python/stackcollapse.py | |
| parent | 403f96c32c9e24600093d7d0c61c17daeedca957 (diff) | |
selftests/net: fix kill() argument order and wrapper cleanup in fin_ack_lat
sig_handler() passes its arguments to kill() in the wrong order: it sends
signal number child_pid to PID SIGTERM (15) instead of sending SIGTERM
to the client process. The call therefore always fails and the signal
is never forwarded: when only the server process receives SIGTERM, the
client keeps running its infinite connect loop as an orphan process.
Swap the arguments so that the server forwards SIGTERM to the client.
Guard the call with child_pid > 0: the client inherits the handler and
sees child_pid == 0, and a plain argument swap would make it call
kill(0, SIGTERM), signaling the whole process group instead of exiting
quietly.
Now that the server actually terminates the client before the wrapper
script's cleanup runs, kill() may fail with ESRCH for the already-exited
client. The script uses set -e, so make the kill tolerant to avoid
aborting the EXIT trap and leaking temporary files.
Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn>
Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260821031442.1124777-1-fffsqian@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
