From 38f4ba22499d77ea8aae55f125d07e28d3d6ffa3 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 17 May 2016 08:31:23 -0600 Subject: [PATCH] Bump I/O buffer size to 64K. We don't use PIPE_BUF or _PC_PIPE_BUF for this because that corresponds to the value for atomic pipe writes. The actual pipe buffer is much larger on modern systems and 64K is what BSD and Linux support for large pipe buffers. --- src/exec_pty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exec_pty.c b/src/exec_pty.c index 13fc12cd1..57a2fb294 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2015 Todd C. Miller + * Copyright (c) 2009-2016 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -78,7 +78,7 @@ struct io_buffer { sudo_io_action_t action; int len; /* buffer length (how much produced) */ int off; /* write position (how much already consumed) */ - char buf[32 * 1024]; + char buf[64 * 1024]; }; SLIST_HEAD(io_buffer_list, io_buffer); -- 2.40.0