mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] clipboard/wayland: ignore SIGPIPE from clients that hang up
Otherwise, a badly-behaving client causes Looking Glass to receive a SIGPIPE during Wayland copy operations. Handle EPIPE at call-sites instead. Co-authored-by: Quantum <quantum2048@gmail.com>
This commit is contained in:

committed by
Geoffrey McRae

parent
48941cb9c4
commit
2627381021
@@ -1861,6 +1861,12 @@ static int lg_run()
|
||||
signal(SIGINT , int_handler);
|
||||
signal(SIGTERM, int_handler);
|
||||
|
||||
// Request to receive EPIPE instead of SIGPIPE when one end of a pipe
|
||||
// disconnects while a write is pending. This is useful to the Wayland
|
||||
// clipboard backend, where an arbitrary application is on the other end of
|
||||
// that pipe.
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
// try map the shared memory
|
||||
if (!ivshmemOpen(&g_state.shm))
|
||||
{
|
||||
|
Reference in New Issue
Block a user