mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
PVF: ensure job processes are cleaned up, add tests (#2643)
Fixes a potential memory leak. `PR_SET_PDEATHSIG` is used to terminate children when the parent dies. Note that this is subject to a race. There seems to be a raceless alternative [here](https://stackoverflow.com/a/42498370/6085242), but the concern is small enough that a bit more complexity doesn't seem worth it. Left a bit more info in the code comment.
This commit is contained in:
@@ -105,9 +105,9 @@ pub async fn spawn_with_program_path(
|
||||
gum::warn!(
|
||||
target: LOG_TARGET,
|
||||
%debug_id,
|
||||
?program_path_clone,
|
||||
?extra_args_clone,
|
||||
?worker_dir_clone,
|
||||
program_path = ?program_path_clone,
|
||||
extra_args = ?extra_args_clone,
|
||||
worker_dir = ?worker_dir_clone,
|
||||
"error spawning worker: {}",
|
||||
err,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user