зеркало из https://github.com/mozilla/gecko-dev.git
Bug 134570, 'Print to file' not working with threaded XprintUtil. Patch by Roland.Mainz@informatik.med.uni-giessen.de, r=cbiesinger@web.de, sr=attinasi, a=asa.
This commit is contained in:
Родитель
70f7cfa69f
Коммит
ff2c7ce0e4
|
@ -48,7 +48,11 @@
|
||||||
#include <prmem.h>
|
#include <prmem.h>
|
||||||
#include <prthread.h>
|
#include <prthread.h>
|
||||||
#define XPU_USE_NSPR 1
|
#define XPU_USE_NSPR 1
|
||||||
#define XPU_USE_THREADS 1
|
/*
|
||||||
|
* Disabled for now - Threaded codepath does not work properly always.
|
||||||
|
* See bug 134570 ("Print-to-file not working with threaded XprintUtil")
|
||||||
|
* #define XPU_USE_THREADS 1
|
||||||
|
*/
|
||||||
#endif /* USE_MOZILLA_TYPES */
|
#endif /* USE_MOZILLA_TYPES */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
@ -357,11 +357,11 @@ void *XpuPrintToFile( Display *pdpy, XPContext pcontext, const char *filename )
|
||||||
XPGetDocStatus XpuWaitForPrintFileChild( void *handle )
|
XPGetDocStatus XpuWaitForPrintFileChild( void *handle )
|
||||||
{
|
{
|
||||||
MyPrintFileData *mpfd = (MyPrintFileData *)handle;
|
MyPrintFileData *mpfd = (MyPrintFileData *)handle;
|
||||||
siginfo_t res;
|
int res;
|
||||||
XPGetDocStatus status = XPGetDocError; /* used when read() from pipe fails */
|
XPGetDocStatus status = XPGetDocError; /* used when read() from pipe fails */
|
||||||
|
|
||||||
if( XPU_TRACE(waitid(P_PID, mpfd->pid, &res, WEXITED)) == -1 )
|
if( XPU_TRACE(waitpid(mpfd->pid, &res, 0)) == -1 )
|
||||||
perror("XpuWaitForPrintFileChild: waitid failure");
|
perror("XpuWaitForPrintFileChild: waitpid failure");
|
||||||
|
|
||||||
/* read the status from the child */
|
/* read the status from the child */
|
||||||
if( read(mpfd->pipe[0], &status, sizeof(XPGetDocStatus)) != sizeof(XPGetDocStatus) )
|
if( read(mpfd->pipe[0], &status, sizeof(XPGetDocStatus)) != sizeof(XPGetDocStatus) )
|
||||||
|
|
Загрузка…
Ссылка в новой задаче