Bash-5.3 patch 16: accommodate macOS dynamic pipe sizing, avoiding hangs

This commit is contained in:
Chet Ramey committed 2026-09-15 11:12:23 -04:00
1 parent b460816602
commit a5f4367d2a
6 files changed
+48 -3

No files matched your search

+21
View File
@@ -595,6 +595,27 @@ sh_unset_nodelay_mode (int fd)
return 0;
}
int
sh_setnodelay (int fd)
{
int flags;
if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
return -1;
/* This is defined to O_NDELAY in filecntl.h if O_NONBLOCK is not present
and O_NDELAY is defined. */
#ifdef O_NONBLOCK
flags |= O_NONBLOCK;
#endif
#ifdef O_NDELAY
flags |= O_NDELAY;
#endif
return (fcntl (fd, F_SETFL, flags));
}
/* Just a wrapper for the define in include/filecntl.h */
int
sh_setclexec (int fd)