connection: do not abort when dup(fd) fails
authorManuel Stoeckl <code@mstoeckl.com>
Fri, 5 Jul 2019 23:48:18 +0000 (19:48 -0400)
committerSimon Ser <contact@emersion.fr>
Tue, 9 Jul 2019 17:30:13 +0000 (17:30 +0000)
commit9d63c9ff84af8187b947c5eabb98b87421bce7f9
tree6e53a841c9471420281644a32b707890bb5ea89c
parenta281783339f7be4d5b6a65c2ba0a6d70ed6d0f1d
connection: do not abort when dup(fd) fails

Instead, cleanly exit wl_closure_marshal and let the caller handler
the error. For wayland-client, the sole calling function will call
wl_abort() anyway. For wayland-server, the calling function will
cleanly shutdown the client.

This change ensures that compositors run with low file descriptor
limits or internal leaks need not crash suddenly (and sometimes
far from the problem) when space runs out.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
src/connection.c