Re: SVGALib / I/O incompatibilites

Search this archive.

From: Dr. Michael Weller (eowmob@exp-math.uni-essen.de)
Date: Wed 14 Feb 2001 - 21:03:19 IST


On Tue, 13 Feb 2001, William Hayes wrote:

> I find that if I attempt to fprintf to stderr in a program using SVGALib, I
> get a segmentation error at the end of program, in the _IO_cleanup ()
> function called by exit().  This seems to be true even if vga_init is the
> only SVGALib function called, and even if fprintf is only invoked before it.
> Printing to the screen using printf under these circumstances does not seem
> to be a problem.
> 
> This is not a major problem -- just wondering if anyone else has seen it.

I never saw it, but I'd guess it is since svgalib does odd things with
stderr (unix handle 2) like reopening on a real console (if it isn't one)
setting raw keyboard mode and stuff. It probably doesn't close FILE
*stderr, but even if it did the fprintf is doomed to fail.

Well, maybe svgalib should ensure that 2 or stderr points to a sensible
device.

Michael.

--

Michael Weller: eowmob@exp-math.uni-essen.de, eowmob@ms.exp-math.uni-essen.de,
or even mat42b@spi.power.uni-essen.de. If you encounter an eowmob account on
any machine in the net, it's very likely it's me.


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST