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).
I'm not familiar with what this is about? I'm away from my computer to look at the code. Is this a plugin to run/spawn external programs and capture output?
If so, you may want to check out my external-tools plugin:
https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tool...
Thanks,
Steve
On 13-11-16 02:20 PM, Steven Blatnick wrote:
I'm not familiar with what this is about? I'm away from my computer to look at the code. Is this a plugin to run/spawn external programs and capture output?
If so, you may want to check out my external-tools plugin:
https://github.com/sblatnick/geany-plugins/tree/external-tools/external-tool...
It's an on-going effort to improve the situation with process spawning on Win32 in Geany core for stuff like "Send Selection To" and running build commands and such.
Cheers, Matthew Brush
On Sat, 16 Nov 2013 15:12:03 -0800 Matthew Brush mbrush@codebrainz.ca wrote:
It's an on-going effort to improve the situation with process spawning on Win32 in Geany core for [...] build commands and such.
BTW, the patched build.c runs the build [non-execute] commands without sh. I'm not sure if sh was used for variable / filename expansion[1], to preserve the command line, or for some other reason. If you think running via /bin/sh is better, I'll restore it, that's trivial.
[1] on win~1, the applications do filename expansion, and the environment variables are not used that much.