On 06/02/2007 1.32, Giovanni Bajo wrote:

> This is not strictly a PyInstaller problem, but rather a Windows problem:
> http://www.microsoft.com/msj/0698/win320698.aspx
> caused by the fact that in Windows the processes are not really in a 
> parent/child relationship.
> 
> Alas, there does not seem to exist a solution that can be totally 
> encapsulated 
> within PyInstaller.

Actually, there seems to be a way to sort of fix this issue under Windows XP 
only (and Vista).

It should be possible to create a kernel job, configure it with the 
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag, and attach the parent process to it. 
After that, the child processes will be parts of the job group as well, and 
will be killed when the parent exits.

This is an example code snippet:
http://forum.sysinternals.com/forum_posts.asp?TID=4094

Don, if your win32-foo is good enough, mind trying this solution? You could 
try sticking the job-related code from that example in winmain.c, in function 
relaunch(), before CreateProcess() is executed.

The proper solution would probably involve some dynamic linking, since job 
functions are available only since Windows 2k, and I don't want to break 
compatibility of the bootloader with older Windows.
-- 
Giovanni Bajo


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to