From 413824d134a6b4b85749b86635eee7754d3ff103 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Thu, 25 Aug 2011 13:18:01 +0800 Subject: [PATCH] server/test: add SIGPIPE handler. --- server/test/freerdp_server.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/test/freerdp_server.c b/server/test/freerdp_server.c index ab6a14932..a7d2d5807 100644 --- a/server/test/freerdp_server.c +++ b/server/test/freerdp_server.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -450,6 +451,9 @@ int main(int argc, char* argv[]) { freerdp_listener* instance; + /* Ignore SIGPIPE, otherwise an SSL_write failure could crash your server */ + signal(SIGPIPE, SIG_IGN); + instance = freerdp_listener_new(); instance->PeerAccepted = test_peer_accepted;