* Re: master 6a19f2a024: Add new --timeout flag to emacsclient [not found] ` <20220906000545.2DD42C0088A@vcs2.savannah.gnu.org> @ 2022-09-06 15:18 ` Robert Pluim 2022-09-06 21:37 ` Stefan Kangas 0 siblings, 1 reply; 3+ messages in thread From: Robert Pluim @ 2022-09-06 15:18 UTC (permalink / raw) To: emacs-devel; +Cc: Stefan Kangas >>>>> On Mon, 5 Sep 2022 20:05:44 -0400 (EDT), Stefan Kangas <stefankangas@gmail.com> said: Stefan> do Stefan> { Stefan> act_on_signals (emacs_socket); Stefan> rl = recv (emacs_socket, string, BUFSIZ, 0); Stefan> + retry = check_socket_timeout (rl); Stefan> + if (retry) Stefan> + { Stefan> + if (timeout > 0 && !saw_response) Stefan> + { Stefan> + /* Don't retry if we were given a --timeout flag. */ Stefan> + fprintf (stderr, "\nServer not responding; timed out after %lu seconds", Stefan> + timeout); Stefan> + retry = false; Stefan> + } Stefan> + else if (!msg_showed) Stefan> + { Stefan> + msg_showed = true; Stefan> + fprintf (stderr, "\nServer not responding; use Ctrl+C to break"); Stefan> + } Stefan> + } Stefan> } Stefan> - while (rl < 0 && errno == EINTR); Stefan> + while ((rl < 0 && errno == EINTR) || retry); Stefan> if (rl <= 0) Stefan> break; Stefan> + if (msg_showed) Stefan> + fprintf (stderr, "\nGot response from server"); Iʼm not sure we want to be writing to stderr every time we get a message from the server after weʼve timed out on the initial recv. Stefan> + saw_response = true; Stefan> string[rl] = '\0'; Stefan> /* Loop over all NL-terminated messages. */ Robert -- ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 6a19f2a024: Add new --timeout flag to emacsclient 2022-09-06 15:18 ` master 6a19f2a024: Add new --timeout flag to emacsclient Robert Pluim @ 2022-09-06 21:37 ` Stefan Kangas 2022-09-07 7:12 ` Andreas Schwab 0 siblings, 1 reply; 3+ messages in thread From: Stefan Kangas @ 2022-09-06 21:37 UTC (permalink / raw) To: Robert Pluim, emacs-devel Robert Pluim <rpluim@gmail.com> writes: > Stefan> + if (msg_showed) > Stefan> + fprintf (stderr, "\nGot response from server"); > > Iʼm not sure we want to be writing to stderr every time we get a > message from the server after weʼve timed out on the initial recv. That was a last minute addition that seemed like a good idea during testing, but I'm happy to remove it if it's more annoying than helpful. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: master 6a19f2a024: Add new --timeout flag to emacsclient 2022-09-06 21:37 ` Stefan Kangas @ 2022-09-07 7:12 ` Andreas Schwab 0 siblings, 0 replies; 3+ messages in thread From: Andreas Schwab @ 2022-09-07 7:12 UTC (permalink / raw) To: Stefan Kangas; +Cc: Robert Pluim, emacs-devel On Sep 06 2022, Stefan Kangas wrote: > Robert Pluim <rpluim@gmail.com> writes: > >> Stefan> + if (msg_showed) >> Stefan> + fprintf (stderr, "\nGot response from server"); >> >> Iʼm not sure we want to be writing to stderr every time we get a >> message from the server after weʼve timed out on the initial recv. > > That was a last minute addition that seemed like a good idea during > testing, but I'm happy to remove it if it's more annoying than helpful. Could be hidden behind a --debug option. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-07 7:12 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <166242274473.18552.15183774163383733253@vcs2.savannah.gnu.org> [not found] ` <20220906000545.2DD42C0088A@vcs2.savannah.gnu.org> 2022-09-06 15:18 ` master 6a19f2a024: Add new --timeout flag to emacsclient Robert Pluim 2022-09-06 21:37 ` Stefan Kangas 2022-09-07 7:12 ` Andreas Schwab
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.