On Tue, 26 Feb 2008 20:10:24 +0100, "Pierre Joye" pierre.php@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