[Qt-interest] Can't kill a process with QProcess::kill()
Mandeep Sandhu
mandeepsandhu.chd at gmail.com
Fri Mar 18 14:24:44 CET 2011
On Fri, Mar 18, 2011 at 5:35 PM, Thiago Macieira <thiago at kde.org> wrote:
> Em sexta-feira, 18 de março de 2011, às 11:42:48, Florian S. escreveu:
>> Hi,
>>
>> i try to kill an asynchronously started QProcess (it's a shellscript which
>> starts aplay) with p->kill(). The sound played by aplay continues, so the
>> process is still running. However, when executing this script in a
>> terminal, it can be killed by either SIGKILL (kill -9) or SIGINT (^C in the
>> terminal).
>>
>> Do you have any idae how i can stop this process?
>
> You probably killed the shell script, but not the aplay process.
>
> Note that QProcess does not set up a POSIX process group for its started
> processes, so killing one process won't necessarily kill all children
> processes.
So in this case what process grp would the shell belong to? I think it
i'll be that of the QT app (which in turn, might have the pgid of its
parent? Or does it have a separate proc grp ID?).
Automatic termination of child proc would happen only if the child is
part of the terminating parent's proc grp, right?
Thanks,
-mandeep
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list