working on issue with pty redirection, not easily reproducible
parent
60a9f2bad2
commit
d15847dbfe
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
#
|
#
|
||||||
echo test from script
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -235,6 +235,10 @@ int exec_pty(
|
||||||
byte_count = read(watched_fds[this_fd].fd, buf, BUFFER_SIZE);
|
byte_count = read(watched_fds[this_fd].fd, buf, BUFFER_SIZE);
|
||||||
|
|
||||||
if (byte_count == -1) {
|
if (byte_count == -1) {
|
||||||
|
if (errno == EAGAIN) {
|
||||||
|
// no data to read
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// error reading from pipe
|
// error reading from pipe
|
||||||
safe_perror("read", &ttyOrig );
|
safe_perror("read", &ttyOrig );
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
@ -265,8 +269,8 @@ int exec_pty(
|
||||||
}
|
}
|
||||||
if (watched_fds[this_fd].revents & POLLERR) {
|
if (watched_fds[this_fd].revents & POLLERR) {
|
||||||
close(watched_fds[this_fd].fd);
|
close(watched_fds[this_fd].fd);
|
||||||
//break_out = true;
|
break_out = true;
|
||||||
continue;
|
//continue;
|
||||||
}
|
}
|
||||||
// if (watched_fds[this_fd].revents & POLLHUP) {
|
// if (watched_fds[this_fd].revents & POLLHUP) {
|
||||||
// // this pipe has hung up
|
// // this pipe has hung up
|
||||||
|
|
Loading…
Reference in New Issue