Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Modules/_remote_debugging/subprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ get_child_pids_platform(pid_t target_pid, int recursive, pid_array_t *result)
PyErr_SetString(PyExc_OSError, "Failed to get process count");
goto done;
}
n_pids /= sizeof(pid_t);

/* Allocate buffer for PIDs (add some slack for new processes) */
int buffer_size = n_pids + 64;
Expand All @@ -322,6 +323,7 @@ get_child_pids_platform(pid_t target_pid, int recursive, pid_array_t *result)
PyErr_SetString(PyExc_OSError, "Failed to list PIDs");
goto done;
}
actual /= sizeof(pid_t);

/* Build pid -> ppid mapping */
ppids = (pid_t *)PyMem_Malloc(actual * sizeof(pid_t));
Expand Down
Loading