The pid_child is never 0 when reaching kill_child, since kill_child
is called within an if-block which checks explicitly for pid_child not
being 0.
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Ruihan Li <lrh2000@pku.edu.cn>
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
static void
kill_child(pid_t pid_child)
{
- if (0 != pid_child) {
- (void) kill (-pid_child, SIGKILL);
- fputs(_(" ...killed.\n"), stderr);
- } else {
- fputs(_(" ...waiting for child to terminate.\n"), stderr);
- }
+ kill(-pid_child, SIGKILL);
+ fputs(_(" ...killed.\n"), stderr);
_exit (255);
}