Re: Too many errors from stdin
Benno Schulenberg <[email protected]>
| Newsgroups | gmane.editors.nano.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Roman, [Please, do not send me email. Reply to the list, and to the list only. I'm CC'ing you because I'm guessing you're not subscribed. I'm subscribed, as you can guess -- no need to CC me.] Op 24-09-2017 om 15:09 schreef Roman Tereshkov: > In easy definition the MPI program allows me to send some work to the different > processor cores on my PC > to get all the power of the processor. So it is useful in parallel programming > for example. So you use MPI in the meaning of "Message Passing Interface"? > 'stty sane' had no effect. I provide you full stuff in .tar (mpi code, screenshot > of the problem and strace dump). Please don't send tar files. Please just do as asked: attach the strace dump. What I imagine that happens is that your standard input gets "scattered" over two or four or however many cores your processor has, and nano gets a normal response from the one core it is actually running on but gets error responses from all the other cores, which results in a failure very quickly. If you apply the attached patch, that simply disables the check for errors, does nano then work normally on your terminal after running an MPI program? Do other editors function normally after running an MPI? Benno _______________________________________________ Help-nano mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-nano
drop-the-check-for-failing-input.patch
(text/x-patch, 619 B)
diff --git a/src/winio.c b/src/winio.c
index 47ccb21f..abda5ee1 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -142,13 +142,6 @@ void get_key_buffer(WINDOW *win)
return;
while (input == ERR) {
- /* If we've failed to get a character MAX_BUF_SIZE times in a row,
- * assume our input source is gone and die gracefully. We could
- * check if errno is set to EIO ("Input/output error") and die in
- * that case, but it's not always set properly. Argh. */
- if (++errcount == MAX_BUF_SIZE)
- die(_("Too many errors from stdin"));
-
#ifndef NANO_TINY
if (the_window_resized) {
regenerate_screen();