developing filter (crash on signal 11)
michael
mchmok at hotmail.com
Wed Feb 13 19:20:29 PST 2013
Hi all
I am developing a filter, and I have some troubles.
Would someone please help?
The filter uses fwrite() to write print data to stdout, but it crashes occasionally. The code is like this.
fwrite( buff, 1, size, stdout );
I have checked the buff pointer, its content and the size, they are ok.
I also added ferror() and fflush() to check on stdout before calling fwrite(), but it does not work.
However it works fine, if I add many many debug messages before and after the fwrite such as
fprintf(stderr, "DEBUG: xxxxx\n");
Can someone please give me some hint?
Is there another way to check stdout works properly before I use fwrite()?
Thanks in advance.
Michael
More information about the cups
mailing list