[Geany-Devel] Spawn module API

Dimitar Zhekov dimitar.zhekov at xxxxx
Sun Jun 21 11:25:41 UTC 2015

On 21.6.2015 г. 06:12, Matthew Brush wrote:

> I just noticed that the new spawn code exposes almost every single bit
> of API possible. Do we really want to do that, or should we limit it
> only to what is currently needed by any plugins? A quick survey of
> Geany-Plugins shows no usage of any of this yet.
> IMO, we shouldn't expose anything which is not needed by plugins,
> especially if it's not related to the plugin API.

The API is designed not only to ease/fix the spawn pipe I/O, but as a 
possible replacement for all glib spawn functions - and these may be 
invoked by any plugin. (There is no replacement for g_spawn_close_pid, 
which works fine, and for g_spawn_check_exit_status, because it's 2.34+ 
only - instead, the WIF* macros are defined system-independently.)

Spawn neither requires not uses anything from Geany (except i18n), and 
does not change anything in Geany state, so it's functions are not 
strictly "Geany" - it could be a separate library just as well.

In the next plugins (after this release), Scope will require at least 
WIF*, spawn_kill_process, SpawnFlags, SpawnReadFunc, 
spawn_with_callbacks, SpawnWriteData and spawn_write_data.
It'll be good if 'debugger' uses them as well...

E-gards: Jimmy

More information about the Devel mailing list