<div>Hi,</div><div><br></div><div>I ran into an issue using Geany on Windows where-in using either the build or compile</div><div>commands to kick off a custom script caused Geany to hang for about a minute, after</div><div>

which it returned and the compiler log showed only a fraction of the output it should.</div><div><br></div><div>After tracking this down, it seems that on Windows, a custom spawn function is used</div><div>in <i>build_spawn_cmd</i> and rather than <i>g_spawn_async_with_pipes, utils_spawn_sync</i></div>

<div>which ends up calling <i>win32_spawn</i>.</div><div><br></div><div><i>win32_spawn</i> would set up pipes for stdout and stderr (using default buffer size), </div><div>kick off the a child process, wait for it finish, and finally dump the stdout/stderr pipes</div>

<div>to a temp file and then read that into memory. if the process didn't exit after a minute, </div><div>it was forcefully killed.</div><div><br></div><div>The problem seems to be that pipes are only 4kb buffered by default, so any process</div>

<div>needing to write more than this would block while writing to stdout and Geany would</div><div>kill it, as it wasn't reading the pipes until after the process exited.</div><div><br></div><div>The attached patch fixes this such that the pipes are read and dumped to the temp</div>

<div>file continuously as the child process runs.  Now the child process will be forcibly killed</div><div>only if it doesn't write to one of its pipes for at least 30 seconds.</div><div><br></div><div><br></div><div>

<br></div><div><br></div><div>Out of curiosity, why isn't <i>g_spawn_async_with_pipes</i> used on Windows?  It seems to</div><div>work with some degree of success for the grep command (as used by <i>search_find_in_files</i>),</div>

<div>albeit without completion status reporting.</div><div><br></div><div><br></div>Regards,<br>Josh Pschorr<br>