Killing the helper does not always work (as it inherits its parent sigmask),
instead of meddling with the sigmask simply close the fds and wait for the
helper to cleanly exit.
Reported-by: Волков Андрей <volkov.am@ekb-info.ru>
Tested-by: Волков Андрей <volkov.am@ekb-info.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
int status;
if (data->decompress_pid != -1) {
- kill(data->decompress_pid, SIGTERM);
- waitpid(data->decompress_pid, &status, 0);
-
close(data->decompress_out_pipe[WRITE_END]);
close(data->decompress_in_pipe[READ_END]);
-
+ waitpid(data->decompress_pid, &status, 0);
data->decompress_pid = -1;
}
}