[Bug 260719] Vlc hangs on open file dialog

Rémi Denis-Courmont remi at remlab.net
Sun Jan 23 08:37:24 GMT 2011


https://bugs.kde.org/show_bug.cgi?id=260719





--- Comment #23 from Rémi Denis-Courmont <remi remlab net>  2011-01-23 09:37:21 ---
(In reply to comment #22)
> > The only portable thread-cooperative mechanism to be notified of the
> > termination of a child process terminate is more or less:
> > 
> >     while (waitpid(pid, 0, &status) != pid);
> 
> Not really. See Thiago's response to see what they are doing in QProcess
> itself:
> http://lists.kde.org/?l=kde-core-devel&m=129572982213216&w=2

That is NOT a solution. As I already said, and as is written in the VLC source
code, any library that relies on setting its own signal handler in a
multi-threaded application like VLC is BROKEN BY DESIGN.

(...)
> I know the only simple and elegant solution would be for kernels to provide a
> better mechanism for being informed of child process terminations, but
> wouldn't the mechanism used in QProcess, as Thiago suggests, a viable
> solution for you in VLC ?

There can only be one signal handler for SIGCHLD (or any other signal). It is
only logical that VLC / the main() function takes care of it. Qt cannot rely on
being able to override that. In fact, we cannot warrant that some *other*
broken library will not attempt to override SIGCHLD too. And then it's back to
square 1 for Qt: its signal handler won't get called.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list