subshell output swallowed (patch)

Pavel Tsekov ptsekov at gmx.net
Tue Jan 24 09:49:58 UTC 2006


On Mon, 23 Jan 2006, Pavel S. Shirshov wrote:

> Hello Egmont,
>
> Monday, January 2, 2006, 11:20:34 PM, you wrote:
>
> EK> When an external command is executed in mc with subshell support, quite
> EK> often some characters of its output are swallowed. Maybe it's most noticable
> EK> with the "ls" command in a directory where there are a lot of files and "ls"
> EK> outputs them in more columns. Just launch a terminal emulator, start mc,
> EK> press ^O so that the panels disappear, and run "ls" a several times. Sure
> EK> you'll see some occasions when the columns are not lined up correctly.
>
> EK> So, when "ls" exits, mc receives a sigchild, which interrupts the write call
> EK> that transfers the output of ls from the subshell to its real output, but
> EK> the interrupted call is not finished, in this particular case 47 bytes are
> EK> skipped.
>
> EK> See the attached patch which fixes this problem.
>
> Applied. Thx.

This patch was in my log of patches to review ... I think that this patch
should not be necessary - after all we have SA_RESTART.



More information about the mc-devel mailing list