diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ser-tcp.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 32a404d..e51664c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-12-18 Martin M. Hunt <hunt@redhat.com> + + * ser-tcp.c (tcp_open): Disable Nagle algorithm which + improves performance in some cases. + 2001-12-17 Ben Harris <bjh21@netbsd.org> * armbsd-nat.c: Remove file, renamed to armnbsd-nat.c. diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 6a65177..6dc8284 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); |