Modified FreeRDP core to ignore SIGPIPE signal. This signal was being generated during a call to SSL_shutdown when the socket is in a disconnected state. The proper way to handle this is to ignore SIGPIPE and allow the write system call to report an errno of EPIPE.
This commit is contained in:
parent
5ce6b787ec
commit
25f834043e
@ -49,6 +49,8 @@ static void fatal_handler(int signum)
|
||||
struct sigaction default_sigaction;
|
||||
sigset_t this_mask;
|
||||
|
||||
printf("fatal_handler: signum=%d\n", signum);
|
||||
|
||||
if (terminal_needs_reset)
|
||||
tcsetattr(terminal_fildes, TCSAFLUSH, &orig_flags);
|
||||
|
||||
@ -74,7 +76,6 @@ const int fatal_signals[] =
|
||||
SIGILL,
|
||||
SIGINT,
|
||||
SIGKILL,
|
||||
SIGPIPE,
|
||||
SIGQUIT,
|
||||
SIGSEGV,
|
||||
SIGSTOP,
|
||||
@ -128,6 +129,9 @@ int freerdp_handle_signals(void)
|
||||
|
||||
pthread_sigmask(SIG_SETMASK, &orig_set, NULL);
|
||||
|
||||
/* Ignore SIGPIPE signal. */
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user