5aa0459be0
I was able to reproduce #3579 in Linux by running: `sudo sysctl net.core.wmem_default=10000` If a subscription message was too big to be sent at once, it was possible to break a client by sending a reply to an other message sent by the client. Eg: - Write 8192 out of 11612 bytes of a workspace event. - Blockingly write the reply to a workspace change message. - Write the rest 3420 bytes of the workspace event. This commit fixes this by utilizing the ipc queue for all types of writes. ipc_receive_message can only be called from a callback started in ipc_new_client. This callback uses the same file descriptor with the client also created in ipc_new_client. When the client is deleted, the read callback is now also stopped. Thus, we can assume that whenever ipc_receive_message is called, the corresponding client should still exist. - ipc_client now contains pointers to both write and read watchers. When freed, a client will stop both of them. - IPC_HANDLERs now work with ipc_clients instead of fds. Fixes #3579. |
||
---|---|---|
.. | ||
i3 | ||
all.h | ||
assignments.h | ||
atoms.xmacro | ||
atoms_NET_SUPPORTED.xmacro | ||
atoms_rest.xmacro | ||
bindings.h | ||
click.h | ||
cmdparse.h | ||
commands.h | ||
commands_parser.h | ||
con.h | ||
config_directives.h | ||
config_parser.h | ||
configuration.h | ||
data.h | ||
display_version.h | ||
ewmh.h | ||
fake_outputs.h | ||
floating.h | ||
handlers.h | ||
i3.h | ||
ipc.h | ||
key_press.h | ||
libi3.h | ||
load_layout.h | ||
log.h | ||
main.h | ||
manage.h | ||
match.h | ||
move.h | ||
output.h | ||
queue.h | ||
randr.h | ||
regex.h | ||
render.h | ||
resize.h | ||
restore_layout.h | ||
scratchpad.h | ||
sd-daemon.h | ||
shmlog.h | ||
sighandler.h | ||
startup.h | ||
sync.h | ||
tree.h | ||
util.h | ||
window.h | ||
workspace.h | ||
x.h | ||
xcb.h | ||
xcursor.h | ||
xinerama.h | ||
yajl_utils.h |