receive_command: replace the 1-buffer, 1-char read loop with recv_unix()
This re-uses the code factored out from send_command() to receive the
sent command in multiple chunks into a dynamic heap buffer. Now we are
able to receive arbitrarily sized commands that span multiple BUFSZs.
This restores a regression from the original Ratpoison.
Example: 'sdorfehs -c "echo $(ncal 2024)"' will print the full year's
calendar as a message, it's over 2k bytes, so it will span 3 buffer
quanta (BUFSZ == 1024 at time of writing).
authored by
jcs.org
153f4ce5
17489f14