Skip to content

Commit

Permalink
Ctrl-C and Ctrl-D were not resetting the stdin
Browse files Browse the repository at this point in the history
- Missed this, moving it out to execute always. I think I was limiting it on
readline as we thought that was causing issues with stdin. But that turned out
to be something else.
  • Loading branch information
Carlos Cabanero committed Jun 11, 2024
1 parent 2a25772 commit d05265c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Blink/TermDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -214,17 +214,17 @@ - (void)write:(NSString *)input

// Cook
if ([input isEqualToString:ctrlC] || [input isEqualToString:ctrlD]) {
[self closeReadline];

if (_readlineSema) {
[self _EOT];
if ([input isEqualToString: ctrlC]) {
fprintf(_stream.err, "^C\n");
}
if ([input isEqualToString: ctrlD]) {
fprintf(_stream.err, "^D\n");
}
// [self closeReadline];

[self _EOT];
//if (_readlineSema) {
if ([input isEqualToString: ctrlC]) {
fprintf(_stream.err, "^C\n");
}
if ([input isEqualToString: ctrlD]) {
fprintf(_stream.err, "^D\n");
}
//}
// NOTE This should send specific signals instead of handling the control openly, but won't change for now.
[self.delegate handleControl: input];
return;
Expand Down

0 comments on commit d05265c

Please sign in to comment.