git: a8f5e24070a2 - main - ee: Handle EINTR when waiting for a character

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 06 Jul 2026 13:18:52 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=a8f5e24070a2fffc752ac7855bfb49049dcbb41e

commit a8f5e24070a2fffc752ac7855bfb49049dcbb41e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-07-06 13:16:45 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-07-06 13:18:18 +0000

    ee: Handle EINTR when waiting for a character
    
    Otherwise one can't easily attach gdb to ee.
    
    Reviewed by:    bapt
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D57997
---
 contrib/ee/ee.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c
index 94bb296bcd65..d397dc27b519 100644
--- a/contrib/ee/ee.c
+++ b/contrib/ee/ee.c
@@ -678,7 +678,11 @@ main(int argc, char *argv[])
 			 * issue
 			 */
 			if (wret == ERR)
+			{
+				if (errno == EINTR)
+					continue;
 				exit(0);
+			}
 			in = (int)win;
 
 			resize_check();