CreateProcess handle immediatly signaled

Dale Burnett denalione at my-deja.com
Wed Aug 16 11:12:35 EDT 2000


In article <8nblic$61d$1 at nnrp1.deja.com>,
  Dale Burnett <denalione at my-deja.com> wrote:
> When using python.exe as the process to spawn in the CreateProcess
> method, the handle that is returned cannot be waited on with
> WaitForSingleObject.  WaitForSingleObject immediatly returns 0 stating
> that the process has ended when I know for sure it is not.  I have
> replaced python.exe with notepad.exe as a test and everything works as
> expected.
>
> I also tried pythonw.exe and it did work either.
>
> Im already guessing Ill need to find another method to signal the
parent
> process that the child is finished but hopefully someone will have
> encountered this before.
>
> Thanks
> Dale
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


After further invetigation I have discovered that I just dont know what
Im doing.  The child process spawns secondary threads then the main
thread exits.  It appears that when the main thread exits the secondary
threads exit automatically, while I thought the secondary threads would
continue to keep the process running and the process would stay non
signaled.

If anyone knows if that is right or wrong please let me know.
Thanks
Dale


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list