mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-18 05:25:33 +01:00
Bash-5.3 patch 16: accommodate macOS dynamic pipe sizing, avoiding hangs
This commit is contained in:
1 parent
b460816602
commit
a5f4367d2a
6 files changed
+48
-3
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user