[Qt-interest] QProcess SIGINT

qt-interest at status.e4ward.com qt-interest at status.e4ward.com
Thu Jul 23 00:51:43 CEST 2009


Ah! I THOUGHT I had a problem that was being caused by the program not  
dying, but I have another problem instead. The process I run with  
QProcess actually spawns a COPY of itself. So, the program QProcess  
runs dies just fine, but the copy continues running. Is there any way  
you can think of that I can kill this child process? Is QProcess aware  
of children?


On Jul 22, 2009, at 3:31 PM, qt-interest at trolltech.com wrote:

> qt-interest at status.e4ward.com wrote:
>> Hey guys, I know QProcess::kill() sends SIGKILL, but I want to send
>> SIGINT. Is there anything built into QProcess to facilitate this?
>
> Try using the kill(2) function. QProcess gives you the PID of the  
> child
> process by calling pid(). So, something like this:
>
>
> 	::kill(process.pid(), SIGINT);
>
> -- 
> Thiago Macieira - thiago.macieira (AT) nokia.com
>  Senior Product Manager - Nokia, Qt Software
>      Sandakerveien 116, NO-0402 Oslo, Norway




More information about the Qt-interest-old mailing list