Re: [code] _G.spawn function on Win32

From: Mitchell <m.att.foicica.com>
Date: Wed, 4 Jun 2014 11:20:40 -0400 (Eastern Daylight Time)

Hi Brian,

On Wed, 4 Jun 2014, Brian Schott wrote:

> It's being executed inside of a handler function for an events.CHAR_ADDED
> event.
>
> local p = spawn(command)
> p:write(buffer:get_text():sub(1, buffer.length))
> return p:read("*a")

This is my fault, as I didn't read the WinAPI carefully. p:write() is to
blame. This will be fixed in tonight's nightly.

> The documentation does not say which parameters to spawn are required. I
> see from the example that exit_cb and stderr_cb are not specified, but they
> are not documented to be optional.

Thanks, I will update the documentation. Only the command is required. All
other arguments are optional.

> The command being launched in my case is a client that communicates the
> buffer contents to a local server (by reading them from stdin) and then
> prints out a list of autocomplete options to stdout.

This should work after I commit the fix for tonight's nightly. Sorry for
the inconvenience.

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 04 Jun 2014 - 11:20:40 EDT

This archive was generated by hypermail 2.2.0 : Thu 05 Jun 2014 - 06:33:28 EDT