Em sexta-feira, 4 de fevereiro de 2011, às 18:05:09, Oswald Buddenhagen escreveu: > On Fri, Feb 04, 2011 at 05:41:16PM +0100, Thiago Macieira wrote: > > This makes each process started spawn a new thread, which > > will block on waitpid(2). > > i have the vague notion that blocking/ignoring sigchld will prevent > wait*() from working on some systems. dunno where i got that from.
>From the man page: ECHILD (for waitpid() or waitid()) The process specified by pid (waitpid()) or idtype and id (waitid()) does not exist or is not a child of the calling process. (This can happen for one's own child if the action for SIGCHLD is set to SIG_IGN. See also the Linux Notes section about threads.) > > I'm working on a solution that won't start the thread unless the > > stderr and stdout pipes close (if they were open in the first place) > > but the subprocess didn't exit. > > that won't work, because the process may spawn children who inherit its > stdio and thus keep it open even after it exits. I thought about that. My work on no-thread-until-pipes-close had already documented this as a behaviour change. > > void QProcessPrivate::initializeProcessManager() > > { > > > > - (void) processManager(); > > + // Unix no longer has a process manager > > neither should windows. => trash? Symbian still does. -- 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
signature.asc
Description: This is a digitally signed message part.