GUACAMOLE-1115: Forcibly kill any outstanding PDF filter job when cleaning up resources.
This commit is contained in:
parent
d734bac590
commit
ce88fa4d4a
@ -199,6 +199,14 @@ int guac_rdp_client_free_handler(guac_client* client) {
|
||||
if (rdp_client->filesystem != NULL)
|
||||
guac_rdp_fs_free(rdp_client->filesystem);
|
||||
|
||||
/* End active print job, if any */
|
||||
guac_rdp_print_job* job = (guac_rdp_print_job*) rdp_client->active_job;
|
||||
if (job != NULL) {
|
||||
guac_rdp_print_job_kill(job);
|
||||
guac_rdp_print_job_free(job);
|
||||
rdp_client->active_job = NULL;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_COMMON_SSH
|
||||
/* Free SFTP filesystem, if loaded */
|
||||
if (rdp_client->sftp_filesystem)
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@ -666,6 +667,9 @@ void guac_rdp_print_job_free(guac_rdp_print_job* job) {
|
||||
|
||||
void guac_rdp_print_job_kill(guac_rdp_print_job* job) {
|
||||
|
||||
/* Forcibly kill filter process, if running */
|
||||
kill(job->filter_pid, SIGKILL);
|
||||
|
||||
/* Stop all handling of I/O */
|
||||
close(job->input_fd);
|
||||
close(job->output_fd);
|
||||
|
Loading…
Reference in New Issue
Block a user