[Interest] QProcess::execute never returning (5.4/5.5 behaviour change)

Alejandro Exojo suy at badopi.org
Tue Jul 28 10:36:11 CEST 2015

El Sunday 26 July 2015, Thiago Macieira escribió:
> On Sunday 26 July 2015 19:11:55 Alejandro Exojo wrote:
> > So, is this a QProcess limitation or a bug? I see the behaviour change
> > across versions. Might be that the other library is doing something plain
> > unnacceptable for QProcess? I tried replacing QProces::execute() with
> > 
> > ::system() and it works as expected, though.

I was wrong here: system() launches the process as wanted, like 
QProcess::execute. The only difference is that it returns -1 quickly instead 
of blocking. So is affected too since should return 0.
> There was a slight behaviour change in 5.5: the SIGCHLD handler is
> installed when first needed, instead of when you instantiate
> QCoreApplication. Another important change is that it no longer needs a
> thread to do it.
> It sounds like a bug in the fuse library. I don't see them installing a
> SIGCHLD handler, but they do block it. That can affect forkfd because the
> old QProcessManager, by virtue of having started a thread (any thread!)
> before the fuse library blocked the signal, would not be blocked.
> But the fuse library restores the block mask before the function exits, so
> I can't see how that could be the issue.

I probably wasn't clear enough: this is on a Mac, so I should have written 
OSXFUSE instead of FUSE. The library is still based in Linux's, but current 
stable OSXFUSE uses an old libfuse. And some parts might be different. This is 
the use of signal(2) that I've found:


> I need an strace -f log of the issue.

OK, here it is with dtruss, which I think it should be equivalent enough.


I tried to make it as short as possible, and I've added traces to help a bit. 
Search for "fuse_mount" or "QProcess" and you'll have the before and after 
those calls.

Let me know if you need anything else, and thank you very much for looking 
into this. :)

Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net

More information about the Interest mailing list