Sorry, that’s:

>>> import subprocess>>> proc = subprocess.Popen(["python"], 
>>> creationflags=subprocess.CREATE_NEW_CONSOLE)>>> send_signal_somehow(proc)

​

On 9 March 2015 at 10:44, Marcus Ottosson <[email protected]> wrote:

> Ah, excellent. This is what I’ve been looking for​, I merely used this
> inverse request thing because I didn’t understand the alternatives well
> enough.
>
> If you own the child process, you can just use a pipe between them to
> communicate.
>
> I’ve seen this mentioned, read about it, attempted it, but never really
> understood it. Could you provide a small example?
>
> Here’s how my situation looks.
>
> >>> import subprocess>>> proc = subprocess.Popen(["python"], 
> >>> creationflags=subprocess.CREATE_NEW_PROCESS)>>> send_signal_somehow(proc)
>
> It’ll open up a new interpreter, how can I handle the incoming signal in
> there, and how do I send it from the parent process?
>
> In a certain daemon service I maintain, I use USR1 to signal a specific
> type of shutdown request as opposed to a SIGTERM.
>
> That also sounds viable; in this case, it’s a request for a GUI in an
> external process to show, which I’d imagine being similar if not identical
> to a shutdown request.
> ​
>



-- 
*Marcus Ottosson*
[email protected]

-- 
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/CAFRtmOAavU0BSO%3DBnOWZ1WuJNN5zXZk1WDtOKq8xu1cc%3D%3D9FVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to