This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Spurious fport_flush warnings: Resource not available


| > | When using our fvwm2 module interface with Scwm, I get numerous spurious 
| > | and seemingly harmless warnings:
| > | 
| > | ERROR: In procedure fport_flush:
| > | ERROR: Resource temporarily unavailable
| > | 
| > | This seems to be from the scm_syserror call at line 664 of fports.c
| > | (from CVS guile today).  I'd like to add code to ignore that case, but
| > | I'm not sure if errno's are portable across platforms.  Any thoughts?
| > 
| > Use something like (and (defined? 'EPERM) (= errno EPERM)) in the
| > error handler?
| 
| Well, the error message is printed in C code so I don't think that's an
| option (unless I'm misunderstanding your suggestion).

Perhaps I misunderstood.  I thought that you had an error handler and
wanted to use the errno value there.  This is possible, since errno is
passed to the error handler by scm_syserror.

Were you actually suggesting adding code to fport_flush itself?  I
don't think that would be a good idea, since an error like that may
indicate that "write" failed and the port was not actually flushed.
It doesn't seem spurious to raise the exception, even if you've
determined that in some particular situation the write actually
succeeded and returned the error code spuriously.

As far as I know the CPP symbols like EPERM are semi-portable across
platforms, but if the numeric values are portable it's only by
accident of inheritance or cut and paste.  Spurious errors tend not to
be portable across platforms anyway.

| Unfortunately, I'm not getting them any more. :-(.  
| I think the
| disappearance correlated with a reboot of my machine, but don't recall
| when they stopped showing up.  If they come back, I'll get the numeric
| value for you.

Really weird problems can be attributed to unstable kernels, cosmic
rays, hardware problems and unusual alignments of large planets.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]