[Geany] [patch]win32_spawn, GError, status code timeout

Enrico Tröger enrico.troeger at xxxxx
Wed Feb 27 16:06:23 UTC 2008


On Tue, 26 Feb 2008 20:10:24 +0100, "Pierre Joye"
<pierre.php at gmail.com> wrote:

Hi.

> Here is another patch to improve a little bit the win32_spawn
Thanks a lot, Pierre.

> functions. It adds:
> 
> - GError support for the win32 functions (thanks to Jeff for the link!)
I changed the usage a little bit to avoid memory leaks.
g_win32_error_message() returns a newly-allocated buffer which needs to
be freed. But not a big deal at all.

> The timeout is set to 30 secondbut it is not really required right
> now, the default behavior being to wait until that the process exists.
> The upcoming async support will use it more intensively (still some
> work, don't hold your breath :).
Hehe, no need to hurry. It's done when it's done.

Attached is a patch which changes the used function for spawning
commands in build.c for View DVI/PDF file and for the general Run
command (e.g. execute a compiled C file or run a python script).
But it shows that there must be a little bug whether in your code or in
the code in build.c. I get these messages on the console:
CreateChildProcess: CreateProcess failed
win32_spawn: Create process failed
utils_spawn_async() failed: Das System kann die angegebene Datei nicht
finden.

(the German message at the end means: the system could not find the
specified file)

The created "cmdline" string looked good:
C:\WINNT\System32\cmd.exe /Q /C G:\geany_run_script.bat

(geany_run_script.bat actually existed and the above command line was
executed as expected in a usually opened cmd.exe)

I didn't look depper into this problem. Maybe you'll find the problem.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.c.vc.diff
Type: text/x-diff
Size: 1222 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20080227/b68e4ad9/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20080227/b68e4ad9/attachment.pgp>


More information about the Users mailing list