gri3-wm/include
Orestis Floros 37d0105c83
Kill misbehaving subscribed clients instead of hanging
This change only affects clients that are subscribed to events, which
should be the main cause of our problems.

In the common case (no buffered data) the behaviour doesn't change at
all: the message is sent directly, no ev_io / ev_timeout callback is
enabled. Once a write to a client's socket is not completed fully
(returns with EAGAIN error), we put the message in the tail of a queue
and init an ev_io callback and a corresponding timer. If the timer is
triggered first, the socket is closed and the client connection is
removed. If the socket becomes writeable before the timeout we either
reset the timer if we couldn't push all the buffered data or completely
remove it if everything was pushed.

We could also replace ipc_send_message() for all client connections in
i3, not just those subscribed to events.

Furthermore, we could limit the amount of messages stored and increase
the timeout (or use multiple timeouts): eg it's ok if a client is not
reading for 10 seconds and we are only holding 5KB of messages for them
but it is not ok if they are inactive for 5 seconds and we have 30MB of
messages held.

Closes #2999
Closes #2539
2018-08-08 19:14:56 +03:00
..
i3 introduce the sync IPC command 2018-03-30 21:09:52 +02:00
all.h move i3 sync code into sync_respond (for following commits) 2018-03-30 21:05:32 +02:00
assignments.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
atoms.xmacro split atoms.xmacro into 2 files to obtain _NET_SUPPORTED count 2016-02-23 21:48:18 +01:00
atoms_NET_SUPPORTED.xmacro Support _NET_WM_STATE_FOCUSED 2018-03-23 14:30:57 +02:00
atoms_rest.xmacro Introduce I3_FLOATING_WINDOW 2016-02-25 18:36:22 +01:00
bindings.h Introduce --exclude-titlebar flag for mouse bindings. (#2703) 2017-05-02 09:08:42 +02:00
click.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
cmdparse.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
commands.h Remove 'method' from cmd_move_window_to_position 2018-03-20 16:59:06 +02:00
commands_parser.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
con.h Introduce *focus_order functions 2018-02-26 23:06:04 +02:00
config_directives.h Kill misbehaving subscribed clients instead of hanging 2018-08-08 19:14:56 +03:00
config_parser.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
configuration.h i3bar: make modifier behave like floating_modifier 2018-04-17 02:00:03 +03:00
data.h Fix memleak: FREE(assign->dest.output) 2018-03-19 02:02:59 +02:00
display_version.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
ewmh.h Support _NET_WM_STATE_FOCUSED 2018-03-23 14:30:57 +02:00
fake_outputs.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
floating.h cmd_move_window_to_position: improve error message 2018-03-20 16:59:06 +02:00
handlers.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
i3.h skip ConfigureNotify events with --force_xinerama 2017-10-23 21:04:20 +02:00
ipc.h Kill misbehaving subscribed clients instead of hanging 2018-08-08 19:14:56 +03:00
key_press.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
libi3.h Kill misbehaving subscribed clients instead of hanging 2018-08-08 19:14:56 +03:00
load_layout.h validate JSON before loading 2017-09-13 17:41:05 +02:00
log.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
main.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
manage.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
match.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
move.h Fix focus order in floating_disable for unfocused windows 2018-03-30 18:20:40 +03:00
output.h Introduce output_primary_name function 2017-09-13 08:22:57 +00:00
queue.h switch to clang-format-3.8 (#2547) 2016-11-08 13:46:43 -08:00
randr.h Introduce get_output_from_rect 2018-03-23 17:42:39 +02:00
regex.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
render.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
resize.h Improve resize_find_tiling_participants() and simplify cmd_resize_tiling_width_height() (#3111) 2018-01-06 17:59:27 +01:00
restore_layout.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
scratchpad.h Make "scratchpad show" return correct info 2018-04-20 22:30:41 +08:00
sd-daemon.h Replace http:// with https:// where applicable 2017-09-24 10:19:07 +02:00
shmlog.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
sighandler.h Rewrite the signal handler dialogs. 2017-01-10 20:13:25 +01:00
startup.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
sync.h move i3 sync code into sync_respond (for following commits) 2018-03-30 21:05:32 +02:00
tree.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
util.h Remove obsolete macro FOR_TABLE 2018-04-20 06:13:40 +03:00
window.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
workspace.h Allow multiple assignments of workspaces to outputs 2018-07-12 17:07:01 +03:00
x.h Reframe swallowed windows if depth doesn't match 2018-06-02 14:32:47 +03:00
xcb.h Refocus focused window for FOCUS_IN events on the root window. (#3097) 2018-03-10 19:18:44 +01:00
xcursor.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
xinerama.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00
yajl_utils.h Ensure all *.[ch] files include config.h 2016-10-23 21:09:24 +02:00