mcedit problem (2)

Andrew V. Samoilov kai at cmail.ru
Mon Dec 17 08:33:13 UTC 2001


Hi, Mattias!

>Hi,
>
>is the following problem known? Sometimes (usually a few times a day :-(
>) if I press F4 to edit a .cc file with the internal editor, the
>Midnight Commander hangs up. Here is the description of the problem:
>

I cannot reproduce this, but it is possible if previous system call was 
interrupted.
fgetc returns -1 on error and on end of file, so additional check needed.

>
>---
>404         for (;;) {
>405             c = fgetc (f);
>406             if (c == EOF) {
>407                 if (errno == EINTR)
>408                     continue;
>---
>
>It tries to read my own `c.syntax' (see the attachment). `c' and `errno'
>always have the same values: c is -1 and errno is EINTR. `f' has the
>following value (produced with `p *f' in the gdb):
>
Does patch below help you?

Regards,
Andrew.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: syntax.c-1.19.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20011217/4164dd5f/attachment.ksh>


More information about the mc-devel mailing list