From: Martin Hunt Date: Tue, 18 Dec 2001 18:54:18 +0000 (+0000) Subject: 2001-12-18 Martin M. Hunt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=67a59bc02d4e7bd331e648efcf1d5a09fe048c56;p=binutils-gdb.git 2001-12-18 Martin M. Hunt * ser-tcp.c (tcp_open): Disable Nagle algorithm which improves performance in some cases. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 32a404d40fe..e51664cdda8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-12-18 Martin M. Hunt + + * ser-tcp.c (tcp_open): Disable Nagle algorithm which + improves performance in some cases. + 2001-12-17 Ben Harris * armbsd-nat.c: Remove file, renamed to armnbsd-nat.c. diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 6a6517744be..6dc82846b6f 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -165,6 +165,11 @@ tcp_open (struct serial *scb, const char *name) tmp = 0; ioctl (scb->fd, FIONBIO, &tmp); + /* Disable Nagle algorithm. Needed in some cases. */ + tmp = 1; + setsockopt (scb->fd, IPPROTO_TCP, TCP_NODELAY, + (char *)&tmp, sizeof (tmp)); + /* If we don't do this, then GDB simply exits when the remote side dies. */ signal (SIGPIPE, SIG_IGN);