The hidden problem with using QProcess/KProcess in kdelibs...

Thiago Macieira thiago at
Sun Jan 23 09:41:50 GMT 2011

On Saturday, 22 de January de 2011 17:16:10 Dawit A wrote:
> The above snippet of code is something I clipped from
> 2f6819120f02d0703152;hb=HEAD
> One cannot easily tell where QCoreApplication's ctor is getting
> called, but I suspect it is sometime after the call to libvlc_new(...)
> at line #201 and hence after all these signal blocking has occurred ??
> Since I was really not sure and did not want to waste to much time
> mucking around in a rather large and complex code base, I actually
> created a small test case to simulate the condition. I can clean that
> up and post it here if you want.
> Oh and the code that instantiates QCoreApplication seems to be located
> around line #533 in:
> d33161c1979db7fbe6f1d0f466db1c7e09;hb=HEAD

Well, there are two components here: the signal handler and the signal mask.

The line:
	signal(SIGCHLD, SIG_DFL);

unsets the handler. It's bad if it's called after QCoreApplication. If it's 
called before, it's harmless.

However, if all signals are blocked (and they seem to be), then the signal 
handler is installed but never called.

Thiago Macieira - thiago (AT) - thiago (AT)
  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: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list