new `jobid' loadable builtin like ash-based shells; fix for nofork command substitution when followed by an asynchronous subshell using GNU nohup; fix for nofork command substitution to move the file descriptor moved to the anonymous file out of the user-accessible range

This commit is contained in:
Chet Ramey
2026-01-23 16:39:00 -05:00
parent c4b56ed9ac
commit b805bbec80
9 changed files with 305 additions and 2 deletions
+29
View File
@@ -308,3 +308,32 @@ ttcbreak (void)
tt = ttin;
return (ttfd_cbreak (0, &tt));
}
int
tt_seteol (TTYSTRUCT *ttp, int c)
{
#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER)
ttp->c_cc[VEOL] = c;
#endif
return 0;
}
int
ttfd_seteol (int fd, TTYSTRUCT *ttp, int c)
{
if (tt_seteol (ttp, c) < 0)
return -1;
return (ttsetattr (fd, ttp));
}
int
ttseteol (int c)
{
TTYSTRUCT tt;
if (ttsaved == 0)
return -1;
tt = ttin;
return (ttfd_seteol (0, &tt, c));
}