#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <signal.h>
#include <sys/types.h>
#ifdef __MINGW32__
}
guac_start_client(client);
-
guac_free_client(client);
/* Close socket */
/* Otherwise, this is the daemon */
GUAC_LOG_INFO("Started, listening on port %i", listen_port);
+ /* Ignore SIGPIPE */
+ if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
+ GUAC_LOG_ERROR("Could not set handler for SIGPIPE to ignore. SIGPIPE will cause termination of the daemon.");
+ }
+
/* Daemon loop */
for (;;) {