Commit eb37a5b7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

decomp: block SIGPIPE on the writer thread

If the decompression process exits unexpectedly (or otherwise closes
the read end of the pipe), we want EPIPE, not SIGPIPE.
parent 139b927f
......@@ -111,6 +111,11 @@ static void *Thread (void *data)
#endif
int fd = p_sys->write_fd;
bool error = false;
sigset_t set;
sigemptyset(&set);
sigaddset(&set, SIGPIPE);
pthread_sigmask(SIG_BLOCK, &set, NULL);
do
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment