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:
caillon%returnzero.com 2002-04-04 11:29:38 +00:00
Родитель 70f7cfa69f
Коммит ff2c7ce0e4
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -48,7 +48,11 @@
#include <prmem.h>
#include <prthread.h>
#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 */
#ifdef DEBUG

Просмотреть файл

@ -357,11 +357,11 @@ void *XpuPrintToFile( Display *pdpy, XPContext pcontext, const char *filename )
XPGetDocStatus XpuWaitForPrintFileChild( void *handle )
{
MyPrintFileData *mpfd = (MyPrintFileData *)handle;
siginfo_t res;
int res;
XPGetDocStatus status = XPGetDocError; /* used when read() from pipe fails */
if( XPU_TRACE(waitid(P_PID, mpfd->pid, &res, WEXITED)) == -1 )
perror("XpuWaitForPrintFileChild: waitid failure");
if( XPU_TRACE(waitpid(mpfd->pid, &res, 0)) == -1 )
perror("XpuWaitForPrintFileChild: waitpid failure");
/* read the status from the child */
if( read(mpfd->pipe[0], &status, sizeof(XPGetDocStatus)) != sizeof(XPGetDocStatus) )