working on issue with pty redirection, not easily reproducible

master
phanes 2024-02-08 07:23:01 -05:00
parent 60a9f2bad2
commit d15847dbfe
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/bash
#
echo test from script
/usr/bin/dialog --title "This should be one argument" --inputbox "Enter your name:" 0 0
#/usr/bin/dialog --title "This should be one argument" --inputbox "Enter your name:" 0 0

View File

@ -235,6 +235,10 @@ int exec_pty(
byte_count = read(watched_fds[this_fd].fd, buf, BUFFER_SIZE);
if (byte_count == -1) {
if (errno == EAGAIN) {
// no data to read
continue;
}
// error reading from pipe
safe_perror("read", &ttyOrig );
exit(EXIT_FAILURE);
@ -265,8 +269,8 @@ int exec_pty(
}
if (watched_fds[this_fd].revents & POLLERR) {
close(watched_fds[this_fd].fd);
//break_out = true;
continue;
break_out = true;
//continue;
}
// if (watched_fds[this_fd].revents & POLLHUP) {
// // this pipe has hung up