[kde-freebsd] kde 4.3.4: preview thumbnails for pdf files
Raphael Kubo da Costa
kubito at gmail.com
Tue Feb 9 14:40:28 CET 2010
On Tuesday 09 February 2010 05:35:42 Andriy Gapon wrote:
> on 09/02/2010 09:24 Andriy Gapon said the following:
> > The strange data seems to be a message "Cannot create thumbnail..." in
> > unicode. And the problem seems to be that thumbnail/preview code doesn't
> > expect waitpid to return with EINTR caused by SIGCHLD when a child
> > (ghostscript process) terminates.
> >
> > This is a snippet from kdegraphics-4.3.4/thumbnailers/ps/gscreator.cpp:
> > if (waitpid(pid, &status, 0) != pid || (status != 0 && status != 256) )
> >
> > ok = false;
> >
> > I believe that EINTR might be generated here, because some wrapping
> > KDE-generic code installs a SIGCHLD handler. But I am not sure about
> > that.
> > I am also not sure if FreeBSD behaves correctly here in either case.
>
> Looks like I can work around the problem by changing the above snippet to
> the following:
> int ret;
> do {
> ret = waitpid(pid, &status, 0);
> } while (ret == -1 && errno == EINTR);
> if (ret != pid || (status != 0 && status != 256) )
> ok = false;
>
> But, as I've said, I am not what is to blame here - gscreator.cpp code or
> OS code. Perhaps, the proper solution would be to simply reset a signal
> handler for SIGCHLD. But I know too little KDE to choose a right
> solution, just sharing my observations and ideas.
I suggest either filing a bug report about this or discussing the issue on the
kde-devel mailing list (you may end up being redirected to the kde-core-devel
mailing list too).
> P.S.
> Some mis-addressed whining :)
> Generating a picture of the first page of a document is great, but not
> always it contains useful information or you can recognize a document by
> it. I really like KDE3 way of providing some additional PDF
> meta-information like document title and author.
> For some reason KDE4 shed that feature. Sigh.
I think this will end up coming back when the Nepomuk stuff is properly in
place, but I'm not following this issue closely enough to be 100% sure.
More information about the kde-freebsd
mailing list