cleanupProcess

Cleanup the children processes.

Create an array of children process groups. Create an array of children pids. Kill the children pids to prohibit them from spawning more processes. Kill the groups from top to bottom.

nothrow
pid_t
cleanupProcess
(
KillT
KillPgT
)
(,
KillT kill
,
KillPgT killpg
)

Parameters

parent_pid Pid

pid of the parent to analyze and kill the children of

kill KillT

a function that kill a process

killpg KillPgT

a function that kill a process group

Return Value

Type: pid_t

the process group of "this".

Meta