[Geany-Devel] spawning rewrite - RFC

Dimitar Zhekov dimitar.zhekov at xxxxx
Sat Nov 16 15:26:51 UTC 2013


Hi,

The attached archive contains:

- spawn.[ch] - spawning functions and tests, not Geany-dependent
- Makefile - to compile the spawning tests under *nix/win~1
- emit.c - a useful program to spawn
- spawn.rsp - as in "./spawn < spawn.rsp"
- respawn.diff - patch for Makefile.am, build.c and tools.c

I can patch search.c as well, if we agree on "grep --exclude-dir"
for the non-recursive searches instead of finding and passing the
file names manually, as explained in the "Improving FiF" thread. If
we don't, or start some endless discussion, feel free to replace
the current mess with a smaller one.

tools.c should probably use spawn_sync(..., gchar *stdout, gchar
*stderr, gint *exit_status), but I haven't written one yet.

If the spawned program emits mixed stdout and stderr messages fast,
like emit.c, they will be grouped, depending on the size of your pipe
buffers. Doesn't seem a problem in practice - the tons of messages
from making Geany with -Wall -WExtra are OK, and running ./autogen.sh
is fine too.

Note that there is no conversion to UNICODE under win~1. Using the
"ANSI" functions is OK AFAICT, make/grep/gcc are all "ANSI" programs,
and the only thing an ansi -> unicode -> ansi conversion does is to
produce errors such as "Create process failed, unable to encode byte
at offset xyz" (win~1 FiF with non-UFT-8 fails regularily).

-- 
E-gards: Jimmy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spawn-0.8.zip
Type: application/zip
Size: 13519 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20131116/b05d88d2/attachment-0001.zip>


More information about the Devel mailing list