Re: Fetchmail reports "input in flex scanner failed"

Matthias Andree <[email protected]>
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
Am 27.05.19 um 00:59 schrieb Dmitry Katsubo via Fetchmail-users:
> I thought that if there is a possibility to improve the error
> reporting, it will certainly make fetchmail better, for example, it
> can additionally check ferrno() value.
> It is difficult to trace the problem if I/O error happens from time to time as the message "input in flex scanner failed" sounds for me that there is something wrong with ~/.fetchmailrc syntax.

Dmitry,

I'll concede it's not the best error message, but it states "input ...
failed", so to me it's pretty clear.

On POSIX-like systems it's mostly EIO or perhaps ENOMEM (which you'd
probably notice in different other ways, too). Syntax errors are
returned as such.

The default flex scanner will indeed report this "input in flex scanner
failed" when ferror(yyin) is set.

If you see enough repeated I/O errors that you care to report these, you
seem to have a special workload, a strange configuration, or failing
hardware. Care to shed some light?

If you can spend a few hours for writing, testing and debugging a macro
or function that I can use as YY_INPUT(buf,result,size_max), I'll
consider it - note it needs to be able to read from pipelines, for
instance, if some script generates ephemeral configuration files on the
fly and feeds it to stdin, through "--fetchmailrc -" (which is
documented). Check rcfile_l.c to see what either my flex stuffed into
the tarball, or what your flex generated, look for #define
YY_INPUT(buf,result,max_size).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.