Wait for zombie process in case of timed out nvts. #379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, if an NVT timedout, the process is terminated and removed
from the running process struct, and the parent process does not wait for the child.
This leaved a zombie process until the end of the scan. The zombies proc become orphan proc
and removed for the system.
Now the timed out nvts are terminated, but a check is performerd to know
if the process was waited, before removing it from the running process struct.
In case it was not cleaned, it is kept in the running process table until is waited
for the parent and finally removed from the struct.