[Qt-interest] Can't kill a process with QProcess::kill()

Thiago Macieira thiago at kde.org
Fri Mar 18 13:05:05 CET 2011


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.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110318/0ea8959d/attachment.bin 


More information about the Qt-interest-old mailing list