Re: [code] [textadept] lspawn 0.3

From: Mitchell <m.att.foicica.com>
Date: Wed, 27 Mar 2013 15:25:29 -0400 (Eastern Daylight Time)

Ryan,

On Wed, 27 Mar 2013, Ryan Pusztai wrote:

> Hi Mitchell,
>
> On Tue, Mar 26, 2013 at 12:09 AM, Mitchell <m.att.foicica.com> wrote:
>
>> Hi,
>>
>> lspawn v0.3 is now available on the wiki: http://foicica.com/wiki/lspawn
>>
>> Important bugs were fixed so updating is highly recommended. The hg
>> repository[1] lists them.
>>
>> lspawn is a Textadept module for spawning asynchronous processes using
>> GTK. (Therefore, it cannot be used with the ncurses version of Textadept).
>> This is useful for interacting with external programs in a separate thread
>> via stdin, stdout, and stderr. Textadept will not block while external
>> programs are running.
>>
>
> I think I might have found a bug. When I have a very large stderr blob
> output from GCC lspawn seems to truncate it. Is that expected?

No, this is a bug. I thought the stdout/stderr callback would be called
every time there is still stuff to read.

The fix is to replace lines 60 and 61 in lspawn.c

   int status = g_io_channel_read_chars(ch, buf, 1024, &len, NULL);
   if (status == G_IO_STATUS_NORMAL && len > 0) {

with

   while (g_io_channel_read_chars(ch, buf, 1024, &len, NULL) ==
G_IO_STATUS_NORMAL && len > 0) {

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 27 Mar 2013 - 15:25:29 EDT

This archive was generated by hypermail 2.2.0 : Thu 28 Mar 2013 - 06:48:22 EDT