[erlang-questions] : Kill a process tree
Tue Apr 24 10:22:43 CEST 2007
June Kim wrote:
> >> 2007/4/22, June Kim <>:
>>>> My original purpose of all this is, to make a test runner, which runs
>>>> a given function, which in turn might create a group of
>>>> processes(which may not be linked to each other) and then kill all of
>>>> them after a certain amount of time. The function under test could be
>>>> written without the specific consideration of being run with the test
> I think I have to consider Ulf's advice: trace.
maybe i'm missing something, but it seems all you want is to kill all
processes that were created while running the test case.
that can of course be easily accomplished by this pseudo-code;
PreProc = processes(),
PostProc = processes(),
[exit(P,kill) || P <- PostProc--PreProc].
More information about the erlang-questions