Re: [code] Error code/message from spawn()

From: Mitchell <m.att.foicica.com>
Date: Sat, 27 Feb 2016 16:55:43 -0500 (EST)

Hi Arnel,

On Sun, 28 Feb 2016, Arnel wrote:

> Hi,
>
> The spawn() description in the Textadept API manual has a section for the spawn_proc:read() operation, which states that
>
>> If an error occurs while reading, returns nil, an error code, and an error message.
>
> What kind of code and message does it give if such an error happens? Is it the same as the ones returned by Lua's os.execute()[1]?
>
> [1] http://www.lua.org/manual/5.3/manual.html#pdf-os.execute

That is a good question. For GTK I don't know the exact answer, but I
suspect they are at least the same codes as Lua returns for the underlying
OS IO functions. (GLib IO functions populate a `GError` object[1] that
contains an error code and message.) For curses the code and message
should be the same as Lua, as the C `errno` variable and `strerr()`
function are used.

Cheers,
Mitchell

[1]: https://developer.gnome.org/glib/stable/glib-IO-Channels.html#g-io-channel-read-line-string

-- 
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 Sat 27 Feb 2016 - 16:55:43 EST

This archive was generated by hypermail 2.2.0 : Sun 28 Feb 2016 - 06:28:22 EST