Then I don't know. Must be a Windows specific problem. In my previous
email, I was addressing that the Maya pid hangs around because you did not
wait on the child process. But the window would still close.
If the kill does absolutely nothing for you and the window doesn't close,
then somehow the signal isn't reaching the app. Do you launch Maya from
some sort of wrapper?
 On 30/10/2014 6:44 AM, "ynedelin" <[email protected]> wrote:

> Hey guys thanks for the reply.
> Justin, sorry I did not see your reply earlier.
> Yes Window does not close. with the kill().
> The reason I am opening all three pipes is because we run Maya using a
> tool that sets up different environments based on the job and software
> versions. This tool also messes around with standard outputs. but even when
> I start Maya outside of the tool, with default machine envs kill() still
> does not work.
>
> I did find a way to do it with this:
>
> *import subprocess*
> *handle = subprocess.Popen("", shell=False)*
> *subprocess.Popen("taskkill /F /T /PID %i"%handle.pid , shell=True)*
>
> Thanks
>
> On Sunday, October 26, 2014 9:20:54 PM UTC-7, Asi Sudai wrote:
>>
>> Like Justin asked, after you send the Popen.kill() can you see the
>> process still running?
>>
>> Also did you try running mayapy instead of maya? I'm not sure what you're
>> trying to do,
>> but mayapy could process what ever you need and then quit, so you won't
>> need to "kill" it. maybe that can work for you?
>>
>> On Thursday, 16 October 2014 18:06:55 UTC-7, ynedelin wrote:
>>>
>>> hey guys,
>>> here is the code
>>>
>>> a = subprocess.Popen("maya", stdout=subprocess.PIPE,
>>> stdin=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
>>> a.kill()
>>>
>>> it does not work.
>>>
>>> I need to start second Maya instance and then shut it down from first
>>> Maya instance
>>>
>>> Second Maya starts fine but then Popen.kill() does not work. What am I
>>> missing?
>>>
>>> Thanks
>>> Yury
>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/c56bf0bb-3b29-49ba-90df-d6761a03effd%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/c56bf0bb-3b29-49ba-90df-d6761a03effd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA052W2s6w%3Dz%2Bkzy8Gfb-_w_JhM%2BVBhxoECRiscnWBZchQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to