On Friday, 4 de February de 2011 19:28:06 Nicolás Alvarez wrote:
> On 04/02/2011, Thiago Macieira <thi...@kde.org> wrote:
> > Ok, fair enough. Threading-after-pipes-closed is not an option then.
> >
> > That leaves back again at square one:
> >  - one thread per subprocess
> >
> > OR
> >
> >  - SIGCHLD handler
> >
> > OR
> >
> >  - kernel developers give us some new syscalls like pidfd or waitpidv
>
> Would signalfd (Linux-specific) be useful for this?

No, completely useless.

I tried it yesterday.

signalfd is as useful as signals themselves: they work if and only if you have
a central place of authority for receiving the signal. It requires blocking
the reception of that signal in all threads, otherwise behaviour is
unpredictable.

In turn, since VLC unblocks SIGCHLD in one thread and even sigwaits on it, the
signalfd never fires.

I threw aw
y the code.

signalfd is not for libraries.
--
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

Attachment: pgpGkFdgf4c1s.pgp
Description: This is a digitally signed message part.

Reply via email to