server/test: add SIGPIPE handler.

This commit is contained in:
Vic Lee 2011-08-25 13:18:01 +08:00
parent 5ad6a5d9d8
commit 413824d134
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <signal.h>
#include <freerdp/constants.h>
#include <freerdp/utils/memory.h>
#include <freerdp/utils/thread.h>
@ -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;